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);
79 const arma::Mat<eT>& gy,
90 void Gradient(
const arma::Mat<eT>& input,
91 const 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 serialize(Archive &ar, const unsigned int)
Serialize the layer.
OutputDataType & Gradient()
Modify the gradient.
OutputDataType & OutputParameter()
Modify the output parameter.
InputDataType & InputParameter()
Modify the input 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...
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...
The core includes that mlpack expects; standard C++ includes and Armadillo.
size_t InputSize() const
Get the input size.
size_t OutputSize() const
Get the output size.
OutputDataType const & Gradient() const
Get the gradient.
OutputDataType const & OutputParameter() const
Get the output parameter.
OutputDataType & Delta()
Modify the delta.
OutputDataType const & Delta() const
Get the delta.
OutputDataType & Parameters()
Modify the parameters.
LinearNoBias()
Create the LinearNoBias object.
InputDataType const & InputParameter() const
Get the input parameter.
OutputDataType const & Parameters() const
Get the parameters.