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)
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.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
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 void fn(const InputVecType &x, OutputVecType &y)
Computes the identity function.
static void deriv(const InputVecType &y, OutputVecType &x)
Computes the first derivatives of the identity function.
static double fn(const double x)
Computes the identity function.
static double deriv(const double)
Computes the first derivative of the identity function.