16 #ifndef MLPACK_ANN_LOSS_FUNCTION_MULTILABEL_SOFTMARGIN_LOSS_HPP 17 #define MLPACK_ANN_LOSS_FUNCTION_MULTILABEL_SOFTMARGIN_LOSS_HPP 31 typename InputDataType = arma::mat,
32 typename OutputDataType = arma::mat
49 const arma::rowvec& weights = arma::rowvec());
57 template<
typename InputType,
typename TargetType>
58 typename InputType::elem_type
Forward(
const InputType& input,
59 const TargetType& target);
68 template<
typename InputType,
typename TargetType,
typename OutputType>
69 void Backward(
const InputType& input,
70 const TargetType& target,
91 template<
typename Archive>
92 void serialize(Archive& ar,
const unsigned int );
96 OutputDataType outputParameter;
102 arma::rowvec classWeights;
112 #include "multilabel_softmargin_loss_impl.hpp" bool & Reduction()
Modify the type of reduction used.
void Backward(const InputType &input, const TargetType &target, OutputType &output)
Ordinary feed backward pass of a neural network.
OutputDataType & OutputParameter() const
Get the output parameter.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
OutputDataType & OutputParameter()
Modify the output parameter.
InputType::elem_type Forward(const InputType &input, const TargetType &target)
Computes the Multi Label Soft Margin Loss function.
bool Reduction() const
Get the type of reduction used.
arma::rowvec & ClassWeights()
Modify the weights assigned to each class.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
MultiLabelSoftMarginLoss(const bool reduction=true, const arma::rowvec &weights=arma::rowvec())
Create the MultiLabelSoftMarginLoss object.
const arma::rowvec & ClassWeights() const
Get the weights assigned to each class.