mlpack 3.4.2
Public Member Functions | List of all members
HingeEmbeddingLoss< InputDataType, OutputDataType > Class Template Reference

The Hinge Embedding loss function is often used to compute the loss between y_true and y_pred. More...

#include <hinge_embedding_loss.hpp>

Public Member Functions

 HingeEmbeddingLoss ()
 Create the Hinge Embedding object. More...
 
template<typename InputType , typename TargetType , typename OutputType >
void Backward (const InputType &input, const TargetType &target, OutputType &output)
 Ordinary feed backward pass of a neural network. More...
 
template<typename InputType , typename TargetType >
InputType::elem_type Forward (const InputType &input, const TargetType &target)
 Computes the Hinge Embedding loss function. More...
 
OutputDataType & OutputParameter ()
 Modify the output parameter. More...
 
OutputDataType & OutputParameter () const
 Get the output parameter. More...
 
template<typename Archive >
void serialize (Archive &ar, const unsigned int)
 Serialize the loss function. More...
 

Detailed Description

template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
class mlpack::ann::HingeEmbeddingLoss< InputDataType, OutputDataType >

The Hinge Embedding loss function is often used to compute the loss between y_true and y_pred.

Template Parameters
InputDataTypeType of the input data (arma::colvec, arma::mat, arma::sp_mat or arma::cube).
OutputDataTypeType of the output data (arma::colvec, arma::mat, arma::sp_mat or arma::cube).

Definition at line 36 of file hinge_embedding_loss.hpp.

Constructor & Destructor Documentation

◆ HingeEmbeddingLoss()

Create the Hinge Embedding object.

Member Function Documentation

◆ Backward()

void Backward ( const InputType &  input,
const TargetType &  target,
OutputType &  output 
)

Ordinary feed backward pass of a neural network.

Parameters
inputThe propagated input activation.
targetThe target vector.
outputThe calculated error.

◆ Forward()

InputType::elem_type Forward ( const InputType &  input,
const TargetType &  target 
)

Computes the Hinge Embedding loss function.

Parameters
inputInput data used for evaluating the specified function.
targetTarget data to compare with.

◆ OutputParameter() [1/2]

OutputDataType & OutputParameter ( )
inline

Modify the output parameter.

Definition at line 69 of file hinge_embedding_loss.hpp.

◆ OutputParameter() [2/2]

OutputDataType & OutputParameter ( ) const
inline

Get the output parameter.

Definition at line 67 of file hinge_embedding_loss.hpp.

◆ serialize()

void serialize ( Archive &  ar,
const unsigned int   
)

Serialize the loss function.


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