From 12dec03af01d43bd6759bc18f148cccdb28f7ab4 Mon Sep 17 00:00:00 2001 From: kartikdutt18 Date: Fri, 24 Jan 2020 15:27:07 +0530 Subject: [PATCH] Style Fix --- src/mlpack/methods/ann/activation_functions/mish_function.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mlpack/methods/ann/activation_functions/mish_function.hpp b/src/mlpack/methods/ann/activation_functions/mish_function.hpp index c3288ab342..95668d338c 100644 --- a/src/mlpack/methods/ann/activation_functions/mish_function.hpp +++ b/src/mlpack/methods/ann/activation_functions/mish_function.hpp @@ -73,7 +73,7 @@ class MishFunction */ static double Deriv(const double y) { - return std::exp(y) * (4 * (y + 1) + std::exp(y) * (4 * y + 6) + + return std::exp(y) * (4 * (y + 1) + std::exp(y) * (4 * y + 6) + 4 * std::exp(2 * y) + std::exp(3 * y)) / std::pow(std::exp(2 * y) + 2 * std::exp(y) + 2, 2); } @@ -87,7 +87,7 @@ class MishFunction template static void Deriv(const InputVecType &y, OutputVecType &x) { - x = arma::exp(y) % (4 * (y + 1) + arma::exp(y) % (4 * y + 6) + + x = arma::exp(y) % (4 * (y + 1) + arma::exp(y) % (4 * y + 6) + 4 * arma::exp(2 * y) + arma::exp(3 * y)) / arma::pow(arma::exp(2 * y) + 2 * arma::exp(y) + 2, 2); }