#ifndef MLPP_ACTIVATION_OLD_H #define MLPP_ACTIVATION_OLD_H // // Activation.hpp // // Created by Marc Melikyan on 1/16/21. // #include "core/math/math_defs.h" #include class MLPPActivationOld { public: real_t linear(real_t z, bool deriv = false); std::vector linear(std::vector z, bool deriv = false); std::vector> linear(std::vector> z, bool deriv = false); real_t sigmoid(real_t z, bool deriv = false); std::vector sigmoid(std::vector z, bool deriv = false); std::vector> sigmoid(std::vector> z, bool deriv = false); std::vector softmax(std::vector z, bool deriv = false); std::vector> softmax(std::vector> z, bool deriv = false); std::vector adjSoftmax(std::vector z); std::vector> adjSoftmax(std::vector> z); std::vector> softmaxDeriv(std::vector z); std::vector>> softmaxDeriv(std::vector> z); real_t softplus(real_t z, bool deriv = false); std::vector softplus(std::vector z, bool deriv = false); std::vector> softplus(std::vector> z, bool deriv = false); real_t softsign(real_t z, bool deriv = false); std::vector softsign(std::vector z, bool deriv = false); std::vector> softsign(std::vector> z, bool deriv = false); real_t gaussianCDF(real_t z, bool deriv = false); std::vector gaussianCDF(std::vector z, bool deriv = false); std::vector> gaussianCDF(std::vector> z, bool deriv = false); real_t cloglog(real_t z, bool deriv = false); std::vector cloglog(std::vector z, bool deriv = false); std::vector> cloglog(std::vector> z, bool deriv = false); real_t logit(real_t z, bool deriv = false); std::vector logit(std::vector z, bool deriv = false); std::vector> logit(std::vector> z, bool deriv = false); real_t unitStep(real_t z, bool deriv = false); std::vector unitStep(std::vector z, bool deriv = false); std::vector> unitStep(std::vector> z, bool deriv = false); real_t swish(real_t z, bool deriv = false); std::vector swish(std::vector z, bool deriv = false); std::vector> swish(std::vector> z, bool deriv = false); real_t mish(real_t z, bool deriv = false); std::vector mish(std::vector z, bool deriv = false); std::vector> mish(std::vector> z, bool deriv = false); real_t sinc(real_t z, bool deriv = false); std::vector sinc(std::vector z, bool deriv = false); std::vector> sinc(std::vector> z, bool deriv = false); real_t RELU(real_t z, bool deriv = false); std::vector RELU(std::vector z, bool deriv = false); std::vector> RELU(std::vector> z, bool deriv = false); real_t leakyReLU(real_t z, real_t c, bool deriv = false); std::vector leakyReLU(std::vector z, real_t c, bool deriv = false); std::vector> leakyReLU(std::vector> z, real_t c, bool deriv = false); real_t ELU(real_t z, real_t c, bool deriv = false); std::vector ELU(std::vector z, real_t c, bool deriv = false); std::vector> ELU(std::vector> z, real_t c, bool deriv = false); real_t SELU(real_t z, real_t lambda, real_t c, bool deriv = false); std::vector SELU(std::vector z, real_t lambda, real_t c, bool deriv = false); std::vector> SELU(std::vector>, real_t lambda, real_t c, bool deriv = false); real_t GELU(real_t z, bool deriv = false); std::vector GELU(std::vector z, bool deriv = false); std::vector> GELU(std::vector> z, bool deriv = false); real_t sign(real_t z, bool deriv = false); std::vector sign(std::vector z, bool deriv = false); std::vector> sign(std::vector> z, bool deriv = false); real_t sinh(real_t z, bool deriv = false); std::vector sinh(std::vector z, bool deriv = false); std::vector> sinh(std::vector> z, bool deriv = false); real_t cosh(real_t z, bool deriv = false); std::vector cosh(std::vector z, bool deriv = false); std::vector> cosh(std::vector> z, bool deriv = false); real_t tanh(real_t z, bool deriv = false); std::vector tanh(std::vector z, bool deriv = false); std::vector> tanh(std::vector> z, bool deriv = false); real_t csch(real_t z, bool deriv = false); std::vector csch(std::vector z, bool deriv = false); std::vector> csch(std::vector> z, bool deriv = false); real_t sech(real_t z, bool deriv = false); std::vector sech(std::vector z, bool deriv = false); std::vector> sech(std::vector> z, bool deriv = false); real_t coth(real_t z, bool deriv = false); std::vector coth(std::vector z, bool deriv = false); std::vector> coth(std::vector> z, bool deriv = false); real_t arsinh(real_t z, bool deriv = false); std::vector arsinh(std::vector z, bool deriv = false); std::vector> arsinh(std::vector> z, bool deriv = false); real_t arcosh(real_t z, bool deriv = false); std::vector arcosh(std::vector z, bool deriv = false); std::vector> arcosh(std::vector> z, bool deriv = false); real_t artanh(real_t z, bool deriv = false); std::vector artanh(std::vector z, bool deriv = false); std::vector> artanh(std::vector> z, bool deriv = false); real_t arcsch(real_t z, bool deriv = false); std::vector arcsch(std::vector z, bool deriv = false); std::vector> arcsch(std::vector> z, bool deriv = false); real_t arsech(real_t z, bool deriv = false); std::vector arsech(std::vector z, bool deriv = false); std::vector> arsech(std::vector> z, bool deriv = false); real_t arcoth(real_t z, bool deriv = false); std::vector arcoth(std::vector z, bool deriv = false); std::vector> arcoth(std::vector> z, bool deriv = false); std::vector activation(std::vector z, bool deriv, real_t (*function)(real_t, bool)); }; #endif /* Activation_hpp */