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,
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>
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"
Implementation of the NoisyLinear layer class.
OutputDataType const & Delta() const
Get the delta.
OutputDataType const & Parameters() const
Get the parameters.
NoisyLinear(const NoisyLinear &)
Copy constructor.
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 & InputParameter()
Modify the input parameter.
NoisyLinear(const size_t inSize, const size_t outSize)
Create the NoisyLinear layer object using the specified number of units.
OutputDataType const & OutputParameter() const
Get the output parameter.
size_t InputSize() const
Get the input size.
NoisyLinear()
Create the NoisyLinear object.
size_t OutputSize() const
Get the output size.
void Gradient(const arma::Mat< eT > &input, const arma::Mat< eT > &error, arma::Mat< eT > &gradient)
OutputDataType const & Gradient() const
Get the gradient.
InputDataType const & InputParameter() const
Get the input parameter.
OutputDataType & Gradient()
Modify the gradient.
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...
OutputDataType & OutputParameter()
Modify the output parameter.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
OutputDataType & Parameters()
Modify the parameters.
arma::mat & Bias()
Modify the bias weights of the layer.
OutputDataType & Delta()
Modify the delta.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.