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
51 template<
typename PredictionType,
typename TargetType>
52 typename PredictionType::elem_type
Forward(
const PredictionType& prediction,
53 const TargetType& target);
63 template<
typename PredictionType,
typename TargetType,
typename LossType>
64 void Backward(
const PredictionType& prediction,
65 const TargetType& target,
76 template<
typename Archive>
77 void serialize(Archive& ar,
const uint32_t );
81 OutputDataType outputParameter;
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
HingeEmbeddingLoss()
Create the Hinge Embedding object.
Definition: hinge_embedding_loss_impl.hpp:23
The core includes that mlpack expects; standard C++ includes and Armadillo.
OutputDataType & OutputParameter()
Modify the output parameter.
Definition: hinge_embedding_loss.hpp:71
OutputDataType & OutputParameter() const
Get the output parameter.
Definition: hinge_embedding_loss.hpp:69
void serialize(Archive &ar, const uint32_t)
Serialize the loss function.
Definition: hinge_embedding_loss_impl.hpp:52
PredictionType::elem_type Forward(const PredictionType &prediction, const TargetType &target)
Computes the Hinge Embedding loss function.
Definition: hinge_embedding_loss_impl.hpp:31
The Hinge Embedding loss function is often used to compute the loss between y_true and y_pred...
Definition: hinge_embedding_loss.hpp:36
void Backward(const PredictionType &prediction, const TargetType &target, LossType &loss)
Ordinary feed backward pass of a neural network.
Definition: hinge_embedding_loss_impl.hpp:41