- rename Layer into RbmLayer
- add some log info on toJson() git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@582 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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 RBMLAYER_HPP
|
||||
#define RBMLAYER_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <armadillo>
|
||||
#include <jsoncpp/json/json.h>
|
||||
#include "Rbm.hpp"
|
||||
#include "ILayer.hpp"
|
||||
|
||||
class RbmLayer : public Rbm
|
||||
{
|
||||
public:
|
||||
RbmLayer *upper;
|
||||
RbmLayer *lower;
|
||||
|
||||
RbmLayer(const std::string &prjname, size_t id, size_t numVisibleX, size_t numVisibleY, size_t numHidden, const Rbm::Params ¶ms);
|
||||
RbmLayer(const RbmLayer& orig);
|
||||
virtual ~RbmLayer();
|
||||
|
||||
Json::Value toJson() const;
|
||||
void saveWeights();
|
||||
|
||||
arma::mat up_pass(const arma::mat& hidden);
|
||||
arma::mat down_pass(const arma::mat& visible);
|
||||
|
||||
size_t id()
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
private:
|
||||
const std::string &m_prjname;
|
||||
std::string m_weightsFile;
|
||||
size_t m_id;
|
||||
size_t m_numVisibleX;
|
||||
size_t m_numVisibleY;
|
||||
const Rbm::Params &m_rbm_params;
|
||||
|
||||
};
|
||||
|
||||
#endif /* RBMLAYER_HPP */
|
||||
|
||||
Reference in New Issue
Block a user