- moved method of layer interaction from Layer to Stack

git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@817 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2022-01-17 08:33:30 +00:00
parent c2f5083fc3
commit a372f1a30d
9 changed files with 381 additions and 117 deletions
+7 -6
View File
@@ -24,6 +24,8 @@
#include "JuceHeader.h"
#include "DrawComponent.hpp"
#include "Layer.hpp"
#include "AStack.hpp"
//[/Headers]
//==============================================================================
@@ -41,7 +43,7 @@ class RbmComponent : public Component
{
public:
//==============================================================================
RbmComponent (const std::string &name, size_t id, size_t numVisibleX, size_t numVisibleY, size_t numHidden, size_t numContext);
RbmComponent (AStack &stack, const std::string &name, size_t id, size_t numVisibleX, size_t numVisibleY, size_t numHidden, size_t numContext);
~RbmComponent();
//==============================================================================
@@ -63,12 +65,8 @@ public:
void redrawWeights();
void redrawWeights(size_t index);
void redrawReconstruction();
void upPass(arma::mat const &v);
void downPass(arma::mat const &v);
void upDownPass(arma::mat const &v);
arma::mat getConvolutedWeight(arma::mat const &h);
ScopedPointer<DrawComponent> DrawVisibleTrain;
ScopedPointer<DrawComponent> DrawHidden;
@@ -85,8 +83,11 @@ private:
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;
void gibbs(const arma::mat& v);
AStack &m_stack;
size_t m_currWeightIndexToDraw;
void onDraw(DrawComponent &obj) override;
void buttonClicked(Button* buttonThatWasClicked) override;