git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@21 b431acfa-c32f-4a4a-93f1-934dc6c82436
134 lines
4.7 KiB
C++
134 lines
4.7 KiB
C++
/*
|
|
==============================================================================
|
|
|
|
This is an automatically generated GUI class created by the Introjucer!
|
|
|
|
Be careful when adding custom code to these files, as only the code within
|
|
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
|
|
and re-saved.
|
|
|
|
Created with Introjucer version: 3.1.0
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions"
|
|
Copyright 2004-13 by Raw Material Software Ltd.
|
|
|
|
==============================================================================
|
|
*/
|
|
|
|
#ifndef __JUCE_HEADER_9002020A4DD09B20__
|
|
#define __JUCE_HEADER_9002020A4DD09B20__
|
|
|
|
//[Headers] -- You can add your own extra header files here --
|
|
#include "JuceHeader.h"
|
|
#include "DrawComponent.h"
|
|
#include "LayerArray.hpp"
|
|
#include "Rbm.hpp"
|
|
//[/Headers]
|
|
|
|
|
|
|
|
//==============================================================================
|
|
/**
|
|
//[Comments]
|
|
An auto-generated component, created by the Introjucer.
|
|
|
|
Describe your class and how it works here!
|
|
//[/Comments]
|
|
*/
|
|
class MainComponent : public Component,
|
|
public LayerArrayListener<VisibleLayer>,
|
|
public RbmListener,
|
|
public DrawListener,
|
|
public ButtonListener,
|
|
public SliderListener,
|
|
public LabelListener
|
|
{
|
|
public:
|
|
//==============================================================================
|
|
MainComponent ();
|
|
~MainComponent();
|
|
|
|
//==============================================================================
|
|
//[UserMethods] -- You can add your own custom methods in this section.
|
|
//[/UserMethods]
|
|
|
|
void paint (Graphics& g);
|
|
void resized();
|
|
void buttonClicked (Button* buttonThatWasClicked);
|
|
void sliderValueChanged (Slider* sliderThatWasMoved);
|
|
void labelTextChanged (Label* labelThatHasChanged);
|
|
|
|
|
|
|
|
private:
|
|
//[UserVariables] -- You can add your own custom variables in this section.
|
|
Weights m_weights;
|
|
ScopedPointer<Rbm> m_pRbm;
|
|
ScopedPointer<DrawComponent> Draw;
|
|
ScopedPointer<DrawComponent> Draw2;
|
|
ScopedPointer<DrawComponent> DrawWeights;
|
|
ScopedPointer<DrawComponent> DrawHidden;
|
|
uint32_t m_vNumX;
|
|
uint32_t m_vNumY;
|
|
uint32_t m_hNum;
|
|
uint32_t m_vNumX_next;
|
|
uint32_t m_vNumY_next;
|
|
uint32_t m_hNum_next;
|
|
LayerArray<VisibleLayer> m_layers;
|
|
void load();
|
|
void save();
|
|
void create();
|
|
void destroy();
|
|
const juce::String& getBaseDir();
|
|
void onChanged(const LayerArray<VisibleLayer> &obj);
|
|
void onEpochTrained(const Rbm &obj);
|
|
void onDraw(DrawComponent &obj);
|
|
String m_baseDir;
|
|
double m_trainingProgress;
|
|
uint32_t m_numGibbs;
|
|
bool m_rbmUseExpectations;
|
|
bool m_rbmDoRaoBlackwell;
|
|
bool m_rbmDoRobbinsMonro;
|
|
bool m_rbmReduceEstimatorVariance;
|
|
//[/UserVariables]
|
|
|
|
//==============================================================================
|
|
ScopedPointer<TextButton> trainButton;
|
|
ScopedPointer<TextButton> addButton;
|
|
ScopedPointer<Slider> patterSlider;
|
|
ScopedPointer<TextButton> reconstructButton;
|
|
ScopedPointer<TextButton> ShakeButton;
|
|
ScopedPointer<Slider> WeightsSlider;
|
|
ScopedPointer<Label> numEpochslabel;
|
|
ScopedPointer<Label> learningRateLabel;
|
|
ScopedPointer<TextButton> testButton;
|
|
ScopedPointer<Label> numVisibleLabel;
|
|
ScopedPointer<Label> numHiddenLabel;
|
|
ScopedPointer<TextButton> createButton;
|
|
ScopedPointer<Label> projectNameLabel;
|
|
ScopedPointer<TextButton> loadButton;
|
|
ScopedPointer<TextButton> saveButton;
|
|
ScopedPointer<Label> numVisibleYLabel;
|
|
ScopedPointer<TextButton> loadTrainingButton;
|
|
ScopedPointer<TextButton> saveTrainingButton;
|
|
ScopedPointer<TextButton> clearTrainingButton;
|
|
ScopedPointer<TextButton> removeTrainingButton;
|
|
ScopedPointer<Slider> numGibbsSlider;
|
|
ScopedPointer<TextButton> reconstructEquButton;
|
|
ScopedPointer<ToggleButton> rbmUseExpectationsToggleButton;
|
|
ScopedPointer<ToggleButton> rbmDoRaoBlackwellToggleButton;
|
|
ScopedPointer<ToggleButton> rbmDoRobbinsMonroToggleButton;
|
|
ScopedPointer<ToggleButton> rbmReduceVarianceToggleButton;
|
|
|
|
|
|
//==============================================================================
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainComponent)
|
|
};
|
|
|
|
//[EndFile] You can add extra defines here...
|
|
//[/EndFile]
|
|
|
|
#endif // __JUCE_HEADER_9002020A4DD09B20__
|