#ifndef MLPP_OUTPUT_LAYER_OLD_H #define MLPP_OUTPUT_LAYER_OLD_H // // OutputLayer.hpp // // Created by Marc Melikyan on 11/4/20. // #include "core/math/math_defs.h" #include "core/string/ustring.h" #include "core/object/reference.h" #include "../activation/activation_old.h" #include "../cost/cost_old.h" #include "../regularization/reg.h" #include "../utilities/utilities.h" #include "../lin_alg/mlpp_matrix.h" #include "../lin_alg/mlpp_vector.h" #include #include #include class MLPPOldOutputLayer { public: MLPPOldOutputLayer(int n_hidden, std::string activation, std::string cost, std::vector> input, std::string weightInit, std::string reg, real_t lambda, real_t alpha); int n_hidden; std::string activation; std::string cost; std::vector> input; std::vector weights; real_t bias; std::vector z; std::vector a; std::map (MLPPActivationOld::*)(std::vector, bool)> activation_map; std::map activationTest_map; std::map, std::vector)> cost_map; std::map (MLPPCostOld::*)(std::vector, std::vector)> costDeriv_map; real_t z_test; real_t a_test; std::vector delta; // Regularization Params std::string reg; real_t lambda; /* Regularization Parameter */ real_t alpha; /* This is the controlling param for Elastic Net*/ std::string weightInit; void forwardPass(); void Test(std::vector x); }; #endif /* OutputLayer_hpp */