peal.training.criterions.OnehotCrossEntropyLoss

class peal.training.criterions.OnehotCrossEntropyLoss[source]

Bases: object

Callable wrapper around cross_entropy_loss().

Parameters:

size_average (bool, optional) – Forwarded to cross_entropy_loss().

Methods

__init__(size_average=True)[source]

Store the size_average flag used on every call.

__call__(input, target, latent_code=None)[source]

Soft-target cross-entropy of input and target; latent_code is ignored.