From c2f5083fc30bcfa95533fd9f404e79c73e36329a Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sun, 16 Jan 2022 15:51:09 +0000 Subject: [PATCH] - refactored weight stuff into AStack git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@816 b431acfa-c32f-4a4a-93f1-934dc6c82436 --- source/DeepStack.cpp | 38 -------------------------------------- source/DeepStack.hpp | 3 --- 2 files changed, 41 deletions(-) diff --git a/source/DeepStack.cpp b/source/DeepStack.cpp index d2e4279..f17ffb7 100644 --- a/source/DeepStack.cpp +++ b/source/DeepStack.cpp @@ -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; diff --git a/source/DeepStack.hpp b/source/DeepStack.hpp index d20b219..fad637a 100644 --- a/source/DeepStack.hpp +++ b/source/DeepStack.hpp @@ -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);