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);
97 const arma::Mat<eT>& gy,
107 template<
typename eT>
108 void Gradient(
const arma::Mat<eT>& input,
109 const arma::Mat<eT>& ,
110 arma::Mat<eT>& gradient);
128 OutputDataType
const&
Delta()
const {
return delta; }
130 OutputDataType&
Delta() {
return delta; }
133 OutputDataType
const&
Gradient()
const {
return gradient; }
146 template<
typename Archive>
147 void serialize(Archive& ar,
const uint32_t );
160 OutputDataType weights;
163 OutputDataType weight;
172 arma::cube distances;
175 OutputDataType delta;
178 OutputDataType deltaTemp;
181 OutputDataType gradient;
184 InputDataType inputParameter;
187 OutputDataType outputParameter;
194 #include "minibatch_discrimination_impl.hpp" OutputDataType const & Gradient() const
Get the gradient.
MiniBatchDiscrimination()
Create the MiniBatchDiscrimination object.
void Backward(const arma::Mat< eT > &, const 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...
void Reset()
Reset the layer parameter.
Linear algebra utility functions, generally performed on matrices or vectors.
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 uint32_t)
Serialize the layer.
OutputDataType & Delta()
Modify the delta.
size_t InputShape() const
Get the shape of the input.
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...
InputDataType const & InputParameter() const
Get the input parameter.