15#ifndef MLPACK_METHODS_ANN_LOSS_FUNCTION_HINGE_EMBEDDING_LOSS_HPP
16#define MLPACK_METHODS_ANN_LOSS_FUNCTION_HINGE_EMBEDDING_LOSS_HPP
33 typename InputDataType = arma::mat,
34 typename OutputDataType = arma::mat
50 template<
typename InputType,
typename TargetType>
51 typename InputType::elem_type
Forward(
const InputType& input,
52 const TargetType& target);
61 template<
typename InputType,
typename TargetType,
typename OutputType>
63 const TargetType& target,
74 template<
typename Archive>
79 OutputDataType outputParameter;
86#include "hinge_embedding_loss_impl.hpp"
The Hinge Embedding loss function is often used to compute the loss between y_true and y_pred.
HingeEmbeddingLoss()
Create the Hinge Embedding object.
OutputDataType & OutputParameter() const
Get the output parameter.
void Backward(const InputType &input, const TargetType &target, OutputType &output)
Ordinary feed backward pass of a neural network.
InputType::elem_type Forward(const InputType &input, const TargetType &target)
Computes the Hinge Embedding loss function.
OutputDataType & OutputParameter()
Modify the output parameter.
void serialize(Archive &ar, const unsigned int)
Serialize the loss function.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.