12 #ifndef MLPACK_METHODS_ANN_ACTIVATION_FUNCTIONS_IDENTITY_FUNCTION_HPP 13 #define MLPACK_METHODS_ANN_ACTIVATION_FUNCTIONS_IDENTITY_FUNCTION_HPP 37 static double Fn(
const double x)
48 template<
typename InputVecType,
typename OutputVecType>
49 static void Fn(
const InputVecType& x, OutputVecType& y)
60 static double Deriv(
const double )
71 template<
typename InputVecType,
typename OutputVecType>
72 static void Deriv(
const InputVecType& y, OutputVecType& x)
74 x.ones(arma::size(y));
85 static void Deriv(
const arma::Cube<eT>& y, arma::Cube<eT>& x)
87 x.ones(y.n_rows, y.n_cols, y.n_slices);
The identity function, defined by.
static void Deriv(const InputVecType &y, OutputVecType &x)
Computes the first derivatives of the identity function.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
static void Fn(const InputVecType &x, OutputVecType &y)
Computes the identity function.
static double Deriv(const double)
Computes the first derivative of the identity function.
static void Deriv(const arma::Cube< eT > &y, arma::Cube< eT > &x)
Computes the first derivatives of the identity function using a 3rd order tensor as input...
static double Fn(const double x)
Computes the identity function.