/* * 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: DeepStack.hpp * Author: jens * * Created on 25. Oktober 2019, 18:26 */ #ifndef DEEPSTACK_HPP #define DEEPSTACK_HPP #include #include #include #include #include "Layer.hpp" #include "AStack.hpp" class DeepStack : public AStack { public: DeepStack(const std::string &dir, const std::string &name, StackType type=StackType::None); DeepStack(const DeepStack& orig); virtual ~DeepStack(); void train(const arma::mat& batch, Rbm::IListener* pListener) override; void train(size_t layerId, const arma::mat& batch, Rbm::IListener* pListener) override; arma::mat upPass(size_t layerId, arma::mat const &v); arma::mat downPass(size_t layerId, arma::mat const &h); arma::mat upDownPass(size_t layerId, arma::mat const &v); size_t numTraining(); void addTraining(const arma::mat &toAdd); void delTraining(int index); size_t loadTrainingBatch(bool doNormalize=false); size_t saveTrainingBatch(); arma::mat& trainingBatch(); private: arma::mat m_trainingBatch; }; #endif /* DEEPSTACK_HPP */