Skip to main content

Module loss

Module loss 

Expand description

Loss module

Structs§

BinaryCrossEntropyLoss
Calculate the binary cross entropy loss from the input logits and the targets.
BinaryCrossEntropyLossConfig
Configuration to create a Binary Cross-entropy loss using the init function.
CTCLoss
Computes the Connectionist Temporal Classification (CTC) loss.
CTCLossConfig
Configuration for the CTC Loss module.
CosineEmbeddingLoss
Cosine embedding loss between two tensors.
CosineEmbeddingLossConfig
Configuration for CosineEmbeddingLoss.
CrossEntropyLoss
Calculate the cross entropy loss from the input logits and the targets.
CrossEntropyLossConfig
Configuration to create a Cross-entropy loss using the init function.
GaussianNLLLoss
Negative log likelihood loss for a Gaussian target with predicted mean and variance, following torch.nn.GaussianNLLLoss.
GaussianNLLLossConfig
Configuration to create a Gaussian NLL loss using the init function.
HingeEmbeddingLoss
Measures the loss given an input tensor x and a target tensor y (each element 1 or -1), following torch.nn.HingeEmbeddingLoss.
HingeEmbeddingLossConfig
Configuration to create a Hinge Embedding loss using the init function.
HuberLoss
Calculate the Huber loss between the inputs and the target.
HuberLossConfig
Configuration to create a Huber loss.
KLDivLoss
Kullback-Leibler Divergence Loss
KLDivLossConfig
Configuration to create a KLDiv loss.
LpLoss
Computes the Lp Loss between predictions and targets.
LpLossConfig
Configuration for the Lp Loss module.
MarginRankingLoss
Measures the loss for ranking two inputs, following torch.nn.MarginRankingLoss.
MarginRankingLossConfig
Configuration to create a Margin Ranking loss.
MseLoss
Calculate the mean squared error loss from the input logits and the targets.
MultiMarginLoss
Multi-class classification margin (hinge) loss between input x and target class indices y, following torch.nn.MultiMarginLoss.
MultiMarginLossConfig
Configuration to create a Multi Margin loss using the init function.
PoissonNllLoss
Negative Log Likelihood (NLL) loss with a Poisson distribution assumption for the target.
PoissonNllLossConfig
Configuration for creating a PoissonNllLoss instance.
RNNTLoss
RNN Transducer (RNNT) loss, as described in Sequence Transduction with Recurrent Neural Networks.
RNNTLossConfig
Configuration for RNNTLoss.
SmoothL1Loss
Computes the Smooth L1 Loss between predictions and targets.
SmoothL1LossConfig
Configuration for the SmoothL1Loss module.
SoftMarginLoss
Calculate the soft margin loss between the input logits and the target tensor.
TripletMarginLoss
Measures the triplet loss given an anchor, a positive, and a negative input, following torch.nn.TripletMarginLoss.
TripletMarginLossConfig
Configuration to create a Triplet Margin loss using the init function.

Enums§

Reduction
The reduction type for the loss.