- refactored

git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@815 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2022-01-16 13:35:57 +00:00
parent 59d3df12fe
commit 084c4902d8
9 changed files with 224 additions and 375 deletions
+50
View File
@@ -0,0 +1,50 @@
/*
* 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 <string>
#include <vector>
#include <armadillo>
#include <jsoncpp/json/json.h>
#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(Rbm::IListener* pListener);
void weightsInit(double stddev);
bool loadWeights();
bool saveWeights();
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();
arma::mat trainingBatch(Layer *pLayer);
private:
arma::mat m_trainingBatch;
};
#endif /* DEEPSTACK_HPP */