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
52 RegularizerType regularizer = RegularizerType());
67 void Forward(
const arma::Mat<eT>& input, arma::Mat<eT>& output);
80 const arma::Mat<eT>& gy,
92 const arma::Mat<eT>& error,
93 arma::Mat<eT>& gradient);
96 OutputDataType
const&
Parameters()
const {
return weights; }
111 OutputDataType
const&
Delta()
const {
return delta; }
113 OutputDataType&
Delta() {
return delta; }
122 OutputDataType
const&
Gradient()
const {
return gradient; }
129 template<
typename Archive>
140 OutputDataType weights;
143 OutputDataType weight;
146 OutputDataType delta;
149 OutputDataType gradient;
152 InputDataType inputParameter;
155 OutputDataType outputParameter;
158 RegularizerType regularizer;
165#include "linear_no_bias_impl.hpp"
Implementation of the LinearNoBias class.
OutputDataType const & Delta() const
Get the delta.
OutputDataType const & Parameters() const
Get the parameters.
LinearNoBias(const size_t inSize, const size_t outSize, RegularizerType regularizer=RegularizerType())
Create the LinearNoBias object using the specified number of units.
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.
OutputDataType const & OutputParameter() const
Get the output parameter.
size_t InputSize() const
Get the input size.
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.
LinearNoBias()
Create the LinearNoBias object.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
OutputDataType & Parameters()
Modify the parameters.
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.