13 #ifndef MLPACK_METHODS_ANN_LAYER_BASE_LAYER_HPP
14 #define MLPACK_METHODS_ANN_LAYER_BASE_LAYER_HPP
45 class ActivationFunction = LogisticFunction,
46 typename InputDataType = arma::mat,
47 typename OutputDataType = arma::mat
67 template<
typename InputType,
typename OutputType>
68 void Forward(
const InputType&& input, OutputType&& output)
70 ActivationFunction::Fn(input, output);
87 arma::Mat<eT> derivative;
88 ActivationFunction::Deriv(input, derivative);
98 OutputDataType
const&
Delta()
const {
return delta; }
100 OutputDataType&
Delta() {
return delta; }
105 template<
typename Archive>
113 OutputDataType delta;
116 OutputDataType outputParameter;
125 class ActivationFunction = LogisticFunction,
126 typename InputDataType = arma::mat,
127 typename OutputDataType = arma::mat
130 ActivationFunction, InputDataType, OutputDataType>;
137 typename InputDataType = arma::mat,
138 typename OutputDataType = arma::mat
141 ActivationFunction, InputDataType, OutputDataType>;
148 typename InputDataType = arma::mat,
149 typename OutputDataType = arma::mat
152 ActivationFunction, InputDataType, OutputDataType>;
159 typename InputDataType = arma::mat,
160 typename OutputDataType = arma::mat
163 ActivationFunction, InputDataType, OutputDataType>;
170 typename InputDataType = arma::mat,
171 typename OutputDataType = arma::mat
174 ActivationFunction, InputDataType, OutputDataType>;
181 typename InputDataType = arma::mat,
182 typename OutputDataType = arma::mat
185 ActivationFunction, InputDataType, OutputDataType>;