13 #ifndef MLPACK_METHODS_ANN_LAYER_LINEAR_NO_BIAS_HPP 14 #define MLPACK_METHODS_ANN_LAYER_LINEAR_NO_BIAS_HPP 34 typename InputDataType = arma::mat,
35 typename OutputDataType = arma::mat,
36 typename RegularizerType = NoRegularizer
51 RegularizerType regularizer = RegularizerType());
66 void Forward(
const arma::Mat<eT>&& input, arma::Mat<eT>&& output);
78 void Backward(
const arma::Mat<eT>&& ,
90 void Gradient(
const arma::Mat<eT>&& input,
91 arma::Mat<eT>&& error,
92 arma::Mat<eT>&& gradient);
95 OutputDataType
const&
Parameters()
const {
return weights; }
110 OutputDataType
const&
Delta()
const {
return delta; }
112 OutputDataType&
Delta() {
return delta; }
121 OutputDataType
const&
Gradient()
const {
return gradient; }
128 template<
typename Archive>
129 void serialize(Archive& ar,
const unsigned int );
139 OutputDataType weights;
142 OutputDataType weight;
145 OutputDataType delta;
148 OutputDataType gradient;
151 InputDataType inputParameter;
154 OutputDataType outputParameter;
157 RegularizerType regularizer;
164 #include "linear_no_bias_impl.hpp" 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 serialize(Archive &ar, const unsigned int)
Serialize the layer.
OutputDataType & Gradient()
Modify the gradient.
OutputDataType & OutputParameter()
Modify the output parameter.
InputDataType const & InputParameter() const
Get the input parameter.
OutputDataType const & OutputParameter() const
Get the output parameter.
InputDataType & InputParameter()
Modify the input parameter.
The core includes that mlpack expects; standard C++ includes and Armadillo.
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...
OutputDataType const & Gradient() const
Get the gradient.
OutputDataType const & Parameters() const
Get the parameters.
OutputDataType & Delta()
Modify the delta.
OutputDataType & Parameters()
Modify the parameters.
LinearNoBias()
Create the LinearNoBias object.
size_t OutputSize() const
Get the output size.
OutputDataType const & Delta() const
Get the delta.
size_t InputSize() const
Get the input size.