nnlib
GPU-accelerated, C/C++ neural network library.
Public Member Functions | List of all members
MeanSquaredError Class Reference

Class representing the Mean Squared Error. More...

#include <loss.h>

Inheritance diagram for MeanSquaredError:
Loss Metric

Public Member Functions

sTensor calculateLoss (const sTensor &targets, const sTensor &predictions) override
 
std::string getShortName () const override
 Short string identifier of the metric. More...
 
- Public Member Functions inherited from Loss
 Loss ()
 Constructor for the Loss class. More...
 
float calculateMetric (const sTensor &targets, const sTensor &predictions) override
 Defines the method inherited from abstract Metric parent. More...
 
- Public Member Functions inherited from Metric
 Metric ()
 Constructor for the Metric class. More...
 
void reset ()
 Reset the metric, i.e.: set numSamples and currentTotalMetric to 0.
 

Additional Inherited Members

- Protected Attributes inherited from Metric
size_t numSamples
 The number of samples processed so far.
 
float currentTotalMetric
 The current total value of the metric.
 

Detailed Description

Class representing the Mean Squared Error.

Examples
MNIST, and Titanic.

Member Function Documentation

◆ getShortName()

std::string MeanSquaredError::getShortName ( ) const
overridevirtual

Short string identifier of the metric.

Used when printing the value of the metric to the terminal.

Returns
A string identifier of the metric.

Implements Metric.


The documentation for this class was generated from the following files: