12 #ifndef MLPACK_METHODS_ANN_LAYER_MINIBATCH_DISCRIMINATION_HPP 13 #define MLPACK_METHODS_ANN_LAYER_MINIBATCH_DISCRIMINATION_HPP 50 typename InputDataType = arma::mat,
51 typename OutputDataType = arma::mat
53 class MiniBatchDiscrimination
69 const size_t features);
84 void Forward(
const arma::Mat<eT>&& input, arma::Mat<eT>&& output);
96 void Backward(
const arma::Mat<eT>&& ,
107 template<
typename eT>
108 void Gradient(
const arma::Mat<eT>&& input,
110 arma::Mat<eT>&& gradient);
128 OutputDataType
const&
Delta()
const {
return delta; }
130 OutputDataType&
Delta() {
return delta; }
133 OutputDataType
const&
Gradient()
const {
return gradient; }
140 template<
typename Archive>
141 void serialize(Archive& ar,
const unsigned int );
154 OutputDataType weights;
157 OutputDataType weight;
166 arma::cube distances;
169 OutputDataType delta;
172 OutputDataType deltaTemp;
175 OutputDataType gradient;
178 InputDataType inputParameter;
181 OutputDataType outputParameter;
188 #include "minibatch_discrimination_impl.hpp" OutputDataType const & Gradient() const
Get the gradient.
MiniBatchDiscrimination()
Create the MiniBatchDiscrimination object.
void Reset()
Reset the layer parameter.
The core includes that mlpack expects; standard C++ includes and Armadillo.
OutputDataType & Gradient()
Modify the gradient.
OutputDataType const & Parameters() const
Get the parameters.
OutputDataType const & OutputParameter() const
Get the output parameter.
OutputDataType & OutputParameter()
Modify the output parameter.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
OutputDataType & Delta()
Modify the delta.
OutputDataType & Parameters()
Modify the parameters.
InputDataType & InputParameter()
Modify the input parameter.
OutputDataType const & Delta() const
Get the delta.
void Forward(const arma::Mat< eT > &&input, arma::Mat< eT > &&output)
Ordinary feed-forward pass of a neural network, evaluating the function f(x) by propagating the activ...
void Backward(const arma::Mat< eT > &&, arma::Mat< eT > &&gy, arma::Mat< eT > &&g)
Ordinary feed-backward pass of a neural network, calculating the function f(x) by propagating x backw...
InputDataType const & InputParameter() const
Get the input parameter.