- fixed progress indicator

- cleaned up


git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@624 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2019-11-07 16:21:35 +00:00
parent 5d281ddca6
commit 4e21dd8114
5 changed files with 50 additions and 33 deletions
+6 -2
View File
@@ -60,7 +60,7 @@ public:
virtual ~RbmComponentListener()
{
}
virtual void onProgressChanged(size_t progressPercent) = 0;
virtual bool onProgressChanged(size_t progressPercent) = 0;
};
@@ -80,7 +80,7 @@ class RbmComponent : public Component
{
public:
//==============================================================================
RbmComponent (const std::string &name, size_t id, size_t numVisibleX, size_t numVisibleY, size_t numHidden);
RbmComponent (const std::string &name, size_t id, size_t numVisibleX, size_t numVisibleY, size_t numHidden, RbmComponentListener *pListener=nullptr);
~RbmComponent();
//==============================================================================
@@ -133,6 +133,10 @@ public:
arma::mat getConvolutedWeight(arma::mat const &h) override;
arma::mat const& getWeights() override;
void train(const arma::mat& batch)
{
Layer::train(batch, this);
}
private:
//[UserVariables] -- You can add your own custom variables in this section.
RbmComponentListener *m_listener;