- added
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@822 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
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 __RNN_COMPONENT_LAYER__
|
||||
#define __RNN_COMPONENT_LAYER__
|
||||
|
||||
//[Headers] -- You can add your own extra header files here --
|
||||
#include "JuceHeader.h"
|
||||
#include "DrawComponent.hpp"
|
||||
#include "Layer.hpp"
|
||||
#include "DeepStack.hpp"
|
||||
|
||||
//[/Headers]
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
//[Comments]
|
||||
An auto-generated component, created by the Introjucer.
|
||||
|
||||
Describe your class and how it works here!
|
||||
//[/Comments]
|
||||
*/
|
||||
class RnnComponentLayer : public Component
|
||||
, public Layer
|
||||
, public DrawListener
|
||||
, public ButtonListener
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
RnnComponentLayer (AStack &stack, const std::string &name, size_t id, size_t numVisibleX, size_t numVisibleY, size_t numHidden, size_t numContext);
|
||||
~RnnComponentLayer();
|
||||
|
||||
//==============================================================================
|
||||
//[UserMethods] -- You can add your own custom methods in this section.
|
||||
//[/UserMethods]
|
||||
|
||||
void paint (Graphics& g);
|
||||
void resized() override;
|
||||
void mouseMove (const MouseEvent& e) override;
|
||||
void mouseEnter (const MouseEvent& e) override;
|
||||
void mouseExit (const MouseEvent& e) override;
|
||||
void mouseDown (const MouseEvent& e) override;
|
||||
void mouseDrag (const MouseEvent& e) override;
|
||||
void mouseUp (const MouseEvent& e) override;
|
||||
void mouseDoubleClick (const MouseEvent& e) override;
|
||||
void mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel) override;
|
||||
|
||||
void setTrainingData(arma::mat const& batch);
|
||||
|
||||
void redrawWeights();
|
||||
void redrawWeights(size_t index);
|
||||
void redrawReconstruction();
|
||||
|
||||
arma::mat getConvolutedWeight(arma::mat const &h);
|
||||
ScopedPointer<DrawComponent> DrawVisibleTrain;
|
||||
ScopedPointer<DrawComponent> DrawHidden;
|
||||
ScopedPointer<DrawComponent> DrawContextTrain;
|
||||
arma::mat getTraining() const;
|
||||
arma::mat getReconst() const;
|
||||
void trainRedraw(const arma::mat& vc);
|
||||
void reconstRedraw(const arma::mat& vc);
|
||||
|
||||
private:
|
||||
//[UserVariables] -- You can add your own custom variables in this section.
|
||||
ScopedPointer<DrawComponent> DrawVisibleReconst;
|
||||
ScopedPointer<DrawComponent> DrawContextReconst;
|
||||
ScopedPointer<DrawComponent> DrawWeights;
|
||||
ScopedPointer<ToggleButton> m_toggleEnable;
|
||||
ScopedPointer<TextButton> m_buttonCopyH2C;
|
||||
|
||||
void onUpPass(const arma::mat& v) override;
|
||||
void onDownPass(const arma::mat& h) override;
|
||||
|
||||
DeepStack &m_stack;
|
||||
size_t m_currWeightIndexToDraw;
|
||||
void onDraw(DrawComponent &obj) override;
|
||||
void buttonClicked(Button* buttonThatWasClicked) override;
|
||||
int m_sizeX;
|
||||
int m_sizeY;
|
||||
//[/UserVariables]
|
||||
|
||||
//==============================================================================
|
||||
|
||||
//==============================================================================
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RnnComponentLayer)
|
||||
};
|
||||
|
||||
//[EndFile] You can add extra defines here...
|
||||
//[/EndFile]
|
||||
|
||||
#endif // __RNN_COMPONENT_LAYER__
|
||||
Reference in New Issue
Block a user