- refactored
- added LayerContructor git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@618 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+13
-1
@@ -20,6 +20,18 @@
|
||||
#include <jsoncpp/json/json.h>
|
||||
#include "Layer.hpp"
|
||||
|
||||
class LayerConstructor
|
||||
{
|
||||
public:
|
||||
LayerConstructor() {}
|
||||
virtual ~LayerConstructor() {}
|
||||
|
||||
virtual Layer* onConstruct(const std::string &name, size_t id, size_t numVisibleX, size_t numVisibleY, size_t numHidden)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
class Stack
|
||||
{
|
||||
public:
|
||||
@@ -32,7 +44,7 @@ public:
|
||||
|
||||
void train(size_t layerId, const arma::mat& batch, Rbm::IListener* pListener);
|
||||
void train(const arma::mat& batch, Rbm::IListener* pListener);
|
||||
bool load();
|
||||
bool load(LayerConstructor *pLayerConstructor=nullptr);
|
||||
bool save();
|
||||
void weightsInit(double stddev);
|
||||
bool loadWeights();
|
||||
|
||||
Reference in New Issue
Block a user