- 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user