3.1.5. clumsygrad.loss
This module provides functions to compute various loss functions.
-
clumsygrad.loss.mse_loss(pred: Tensor, target: Tensor) → Tensor[source]
Computes the Mean Squared Error (MSE) loss between the predicted and target tensors.
- Parameters:
-
- Returns:
The MSE loss tensor.
- Return type:
Tensor
-
clumsygrad.loss.mae_loss(pred: Tensor, target: Tensor) → Tensor[source]
Computes the Mean Absolute Error (MAE) loss between the predicted and target tensors.
- Parameters:
-
- Returns:
The MAE loss tensor.
- Return type:
Tensor