23 #ifndef MLPACK_METHODS_ANN_LAYER_RELU6_HPP 24 #define MLPACK_METHODS_ANN_LAYER_RELU6_HPP 37 template<
typename InputDataType = arma::mat,
38 typename OutputDataType = arma::mat>
55 template<
typename InputType,
typename OutputType>
56 void Forward(
const InputType& input, OutputType& output);
67 template<
typename DataType>
68 void Backward(
const DataType& input,
const DataType& gy, DataType& g);
76 OutputDataType
const&
Delta()
const {
return delta; }
78 OutputDataType&
Delta() {
return delta; }
86 template<
typename Archive>
87 void serialize(Archive& ar,
const uint32_t );
91 OutputDataType outputParameter;
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
OutputDataType const & OutputParameter() const
Get the output parameter.
Definition: relu6.hpp:71
The core includes that mlpack expects; standard C++ includes and Armadillo.
OutputDataType const & Delta() const
Get the delta.
Definition: relu6.hpp:76
ReLU6()
Create the ReLU6 object.
Definition: relu6_impl.hpp:33
OutputDataType & Delta()
Modify the delta.
Definition: relu6.hpp:78
void Backward(const DataType &input, const DataType &gy, DataType &g)
Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backw...
Definition: relu6_impl.hpp:51
void serialize(Archive &ar, const uint32_t)
Serialize the layer.
Definition: relu6_impl.hpp:67
OutputDataType & OutputParameter()
Modify the output parameter.
Definition: relu6.hpp:73
size_t WeightSize() const
Get size of weights.
Definition: relu6.hpp:81
void Forward(const InputType &input, OutputType &output)
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activ...
Definition: relu6_impl.hpp:40