loss.cc File Reference
#include "loss.h"
Include dependency graph for loss.cc:

Functions

Variable MSELoss (const std::vector< Variable > &predictions, const std::vector< double > &targets)
 

Function Documentation

◆ MSELoss()

Variable MSELoss ( const std::vector< Variable > &  predictions,
const std::vector< double > &  targets 
)

Calculates the Mean Squared Error (MSE) loss between a vector of predictions and a vector of targets.

Parameters
predictionsThe vector of predicted values.
targetsThe vector of target values.
Returns
The calculated MSE loss as a Variable.