Files
Rbm/source/Stack.hpp
T
2019-11-07 13:13:33 +00:00

57 lines
1.0 KiB
C++

/*
* 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: Stack.hpp
* Author: jens
*
* Created on 25. Oktober 2019, 18:26
*/
#ifndef STACK_HPP
#define STACK_HPP
#include <string>
#include <vector>
#include <armadillo>
#include <jsoncpp/json/json.h>
#include "Layer.hpp"
class Stack
{
public:
Stack(const std::string &name);
Stack(const Stack& orig);
virtual ~Stack();
void addLayer(Layer *pLayer);
Layer* getLayer(size_t layerId) const;
void train(size_t layerId, const arma::mat& batch, Rbm::IListener* pListener);
void train(const arma::mat& batch, Rbm::IListener* pListener);
bool load();
bool save();
void weightsInit(double stddev);
bool loadWeights();
bool saveWeights();
void batchchanged()
{
std::cout << "Stack::batchchanged() called" << std::endl;
}
size_t numLayers();
private:
std::string m_name;
Layer *m_pLayers;
};
#endif /* STACK_HPP */