- introduce RbmComponent

git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@288 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2016-06-14 18:52:08 +00:00
parent 80135d0498
commit 93b6144864
5 changed files with 586 additions and 184 deletions
+6 -18
View File
@@ -24,7 +24,7 @@
#include "JuceHeader.h"
#include "DrawComponent.h"
#include "LayerArray.hpp"
#include "Rbm.hpp"
#include "RbmComponent.h"
//[/Headers]
@@ -38,9 +38,7 @@
//[/Comments]
*/
class MainComponent : public Component,
public LayerArrayListener,
public RbmListener,
public DrawListener,
public RbmComponentListener,
public Thread,
public ButtonListener,
public SliderListener,
@@ -69,35 +67,25 @@ public:
void mouseDoubleClick (const MouseEvent& e);
void mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel);
void onLayerSizeChanged(size_t size) override;
void onRbmEpochTrained(size_t progressPercent) override;
private:
//[UserVariables] -- You can add your own custom variables in this section.
ScopedPointer<Weights> m_weights;
ScopedPointer<Rbm> m_pRbm;
ScopedPointer<DrawComponent> DrawTraining;
ScopedPointer<DrawComponent> DrawReconstruction;
ScopedPointer<DrawComponent> DrawWeights;
ScopedPointer<DrawComponent> DrawVars;
ScopedPointer<DrawComponent> DrawHidden;
ScopedPointer<RbmComponent> m_pRbmComponent;
uint32_t m_vNumX;
uint32_t m_vNumY;
uint32_t m_hNum;
LayerArray m_layers;
MatrixXd m_trainingData;
void load();
void save();
void create(const char *pFilename=nullptr);
void destroy();
const juce::String& getBaseDir();
void onChanged(const LayerArray &obj);
void onEpochTrained(const Rbm &obj);
void onDraw(DrawComponent &obj);
void redrawReconstruction(uint32_t numIter);
void redrawWeights(int index);
void run();
String m_baseDir;
uint32_t m_numGibbs;
//[/UserVariables]
//==============================================================================