CrossEntropyLoss# class torch_brain.nn.CrossEntropyLoss[source]# Bases: torch_brain.nn.loss.Loss forward(input, target, weights=None)[source]# Compute cross-entropy loss. Parameters: input (Tensor) – The input tensor. target (Tensor) – The target tensor. weights (Tensor, optional) – The weights tensor. Return type: Tensor