12 #ifndef MLPACK_METHODS_ANN_LAYER_NOISYLINEAR_HPP 13 #define MLPACK_METHODS_ANN_LAYER_NOISYLINEAR_HPP 30 typename InputDataType = arma::mat,
31 typename OutputDataType = arma::mat
46 const size_t outSize);
74 void Forward(
const arma::Mat<eT>& input, arma::Mat<eT>& output);
87 const arma::Mat<eT>& gy,
98 void Gradient(
const arma::Mat<eT>& input,
99 const arma::Mat<eT>& error,
100 arma::Mat<eT>& gradient);
118 OutputDataType
const&
Delta()
const {
return delta; }
120 OutputDataType&
Delta() {
return delta; }
129 OutputDataType
const&
Gradient()
const {
return gradient; }
134 arma::mat&
Bias() {
return bias; }
139 template<
typename Archive>
140 void serialize(Archive& ar,
const unsigned int );
150 OutputDataType weights;
153 OutputDataType weight;
156 OutputDataType weightMu;
159 OutputDataType weightSigma;
162 OutputDataType weightEpsilon;
168 OutputDataType biasMu;
171 OutputDataType biasSigma;
174 OutputDataType biasEpsilon;
177 OutputDataType delta;
180 OutputDataType gradient;
183 InputDataType inputParameter;
186 OutputDataType outputParameter;
193 #include "noisylinear_impl.hpp" OutputDataType & Delta()
Modify the delta.
OutputDataType & OutputParameter()
Modify the output parameter.
OutputDataType const & Parameters() const
Get the parameters.
OutputDataType & Gradient()
Modify the gradient.
Linear algebra utility functions, generally performed on matrices or vectors.
OutputDataType const & Gradient() const
Get the gradient.
The core includes that mlpack expects; standard C++ includes and Armadillo.
NoisyLinear()
Create the NoisyLinear object.
OutputDataType const & OutputParameter() const
Get the output parameter.
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...
arma::mat & Bias()
Modify the bias weights of the layer.
OutputDataType & Parameters()
Modify the parameters.
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...
size_t InputSize() const
Get the input size.
size_t OutputSize() const
Get the output size.
OutputDataType const & Delta() const
Get the delta.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
InputDataType const & InputParameter() const
Get the input parameter.
InputDataType & InputParameter()
Modify the input parameter.