- refactored weight stuff into AStack
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@816 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -29,44 +29,6 @@ DeepStack::~DeepStack()
|
||||
{
|
||||
}
|
||||
|
||||
void DeepStack::weightsInit(double stddev)
|
||||
{
|
||||
Layer *pLayer = m_pLayers;
|
||||
while(pLayer)
|
||||
{
|
||||
pLayer->weightsInit(stddev);
|
||||
pLayer = pLayer->next;
|
||||
}
|
||||
}
|
||||
|
||||
bool DeepStack::loadWeights()
|
||||
{
|
||||
Layer *pLayer = m_pLayers;
|
||||
while(pLayer)
|
||||
{
|
||||
if (!pLayer->weightsLoad(m_dir, m_name))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
pLayer = pLayer->next;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DeepStack::saveWeights()
|
||||
{
|
||||
Layer *pLayer = m_pLayers;
|
||||
while(pLayer)
|
||||
{
|
||||
if (!pLayer->weightsSave(m_dir, m_name))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
pLayer = pLayer->next;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void DeepStack::train(Rbm::IListener* pListener)
|
||||
{
|
||||
Layer *pLayer = m_pLayers;
|
||||
|
||||
@@ -29,9 +29,6 @@ public:
|
||||
virtual ~DeepStack();
|
||||
|
||||
void train(Rbm::IListener* pListener);
|
||||
void weightsInit(double stddev);
|
||||
bool loadWeights();
|
||||
bool saveWeights();
|
||||
|
||||
size_t numTraining();
|
||||
void addTraining(const arma::mat &toAdd);
|
||||
|
||||
Reference in New Issue
Block a user