PointwiseLoss

class PointwiseLoss(reduction='mean')[source]

Bases: Loss

Pointwise loss functions compute an independent loss term for each triple-label pair.

Initialize the loss.

Parameters

reduction (str) – the reduction, cf. _Loss.__init__

Methods Summary

validate_labels(labels)

Check whether labels are in [0, 1].

Methods Documentation

static validate_labels(labels)[source]

Check whether labels are in [0, 1].

Return type

bool

Parameters

labels (FloatTensor) –