Update src/mlpack/methods/ann/activation_functions/softplus_function.hpp
Co-authored-by: Ryan Curtin <ryan@ratml.org>
This commit is contained in:
co-authored by
Ryan Curtin
parent
8914a1db6a
commit
e8f64d5c40
@@ -91,7 +91,9 @@ class SoftplusFunction
|
||||
* @param dy The resulting derivatives.
|
||||
*/
|
||||
template<typename InputType, typename OutputType, typename DerivType>
|
||||
static void Deriv(const InputType& x, const OutputType& /* y */, DerivType &dy)
|
||||
static void Deriv(const InputType& x,
|
||||
const OutputType& /* y */,
|
||||
DerivType& dy)
|
||||
{
|
||||
dy = 1.0 / (1 + arma::exp(-x));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user