12 #ifndef MLPACK_METHODS_ANN_LOSS_FUNCTIONS_EARTH_MOVER_DISTANCE_HPP 13 #define MLPACK_METHODS_ANN_LOSS_FUNCTIONS_EARTH_MOVER_DISTANCE_HPP 30 typename InputDataType = arma::mat,
31 typename OutputDataType = arma::mat
47 template<
typename InputType,
typename TargetType>
48 double Forward(
const InputType&& input,
const TargetType&& target);
57 template<
typename InputType,
typename TargetType,
typename OutputType>
58 void Backward(
const InputType&& input,
59 const TargetType&& target,
70 template<
typename Archive>
71 void serialize(Archive& ar,
const unsigned int );
75 OutputDataType outputParameter;
82 #include "earth_mover_distance_impl.hpp"
The core includes that mlpack expects; standard C++ includes and Armadillo.
The earth mover distance function measures the network's performance according to the Kantorovich-Rub...
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
double Forward(const InputType &&input, const TargetType &&target)
Ordinary feed forward pass of a neural network.
EarthMoverDistance()
Create the EarthMoverDistance object.
void Backward(const InputType &&input, const TargetType &&target, OutputType &&output)
Ordinary feed backward pass of a neural network.
OutputDataType & OutputParameter()
Modify the output parameter.
OutputDataType & OutputParameter() const
Get the output parameter.