MSELoss#

class torch_brain.nn.MSELoss[source]#

Bases: torch_brain.nn.loss.Loss

forward(input, target, weights=None)[source]#

Compute mean squared error loss.

Parameters:
  • input (Tensor) – The input tensor.

  • target (Tensor) – The target tensor.

  • weights (Tensor, optional) – The weights tensor.

Return type:

Tensor