/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: Layer.hpp * Author: jens * * Created on 25. Oktober 2019, 08:13 */ #ifndef LAYER_HPP #define LAYER_HPP #include #include #include #include "Rbm.hpp" #include "ILayer.hpp" class Layer : public ILayer { public: Layer(const std::string &prjname, size_t id, size_t numVisibleX, size_t numVisibleY, size_t numHidden); Layer(const Layer& orig); virtual ~Layer(); Json::Value toJson() const; Rbm& rbm(); void saveWeight(); void up_pass(const arma::mat& v) override; void down_pass(arma::mat& dst, const arma::mat& src) override; private: const std::string &m_prjname; std::string m_weightsFile; size_t m_id; size_t m_numVisibleX; size_t m_numVisibleY; Rbm::Params m_rbm_params; Rbm m_rbm; }; #endif /* LAYER_HPP */