- refactored
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@825 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+7
-8
@@ -10,6 +10,7 @@
|
||||
#include "Rbm.hpp"
|
||||
#include "Layer.hpp"
|
||||
#include "DeepStack.hpp"
|
||||
#include "StackCreator.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace arma;
|
||||
@@ -199,21 +200,19 @@ int main()
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
DeepStack stack(".", "poet5");
|
||||
|
||||
// Load project
|
||||
stack.load();
|
||||
AStack *stack = StackCreator::fromFile(".", "poet5");
|
||||
|
||||
// Load weights
|
||||
stack.loadWeights();
|
||||
stack->loadWeights(".");
|
||||
|
||||
// Load training
|
||||
stack.loadTrainingBatch();
|
||||
stack->loadTrainingBatch(".");
|
||||
|
||||
Layer *layer = stack.getLayer(0);
|
||||
int numTraining = stack.trainingBatch().n_rows;
|
||||
Layer *layer = stack->getLayer(0);
|
||||
int numTraining = stack->trainingBatch().n_rows;
|
||||
|
||||
arma::mat t = stack.trainingBatch();
|
||||
arma::mat t = stack->trainingBatch();
|
||||
|
||||
arma::mat h = layer->toHiddenProbs(t);
|
||||
arma::mat r = layer->toVisibleProbs(h);
|
||||
|
||||
Reference in New Issue
Block a user