Class MeanSquaredError
The mean squared error (MSE) or mean squared deviation (MSD) of an estimator (of a procedure for estimating an unobserved quantity) measures the average of the squares of the errors—that is, the average squared difference between the estimated values and what is estimated.
Inherited Members
Namespace: SiaNet.Losses
Assembly: SiaNet.dll
Syntax
public class MeanSquaredError : BaseLoss
Constructors
| Improve this Doc View SourceMeanSquaredError()
Initializes a new instance of the MeanSquaredError class.
Declaration
public MeanSquaredError()
Methods
| Improve this Doc View SourceBackward(Tensor, Tensor)
Backpropagation method to calculate gradient of the loss function
Declaration
public override Tensor Backward(Tensor preds, Tensor labels)
Parameters
Type | Name | Description |
---|---|---|
Tensor | preds | The predicted result. |
Tensor | labels | The true result. |
Returns
Type | Description |
---|---|
Tensor |
Overrides
| Improve this Doc View SourceForward(Tensor, Tensor)
Forwards the inputs and calculate the loss.
Declaration
public override Tensor Forward(Tensor preds, Tensor labels)
Parameters
Type | Name | Description |
---|---|---|
Tensor | preds | The predicted result. |
Tensor | labels | The true result. |
Returns
Type | Description |
---|---|
Tensor |