- load training, save weights
- provide params at construction time git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@566 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+4
-3
@@ -24,7 +24,7 @@ public:
|
||||
struct Params
|
||||
{
|
||||
Params()
|
||||
: m_weightDecay(0.01)
|
||||
: m_weightDecay(0.0)
|
||||
, m_learningRate(0.1)
|
||||
, m_momentum(0.5)
|
||||
, m_doRaoBlackwell(true)
|
||||
@@ -65,11 +65,11 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
Rbm(arma::mat &w, arma::mat &bv, arma::mat &bh);
|
||||
Rbm(const Params& params, arma::mat &w, arma::mat &bv, arma::mat &bh);
|
||||
Rbm(const Rbm& orig);
|
||||
virtual ~Rbm();
|
||||
|
||||
void train(arma::mat const &batch, size_t numEpochs, size_t sizeMiniBatch, Params const ¶ms, IListener *pListener);
|
||||
void train(arma::mat const &batch, size_t numEpochs, size_t sizeMiniBatch, IListener *pListener);
|
||||
arma::mat toHidden(const arma::mat &v);
|
||||
arma::mat toVisible(const arma::mat &h);
|
||||
arma::mat& weights();
|
||||
@@ -78,6 +78,7 @@ public:
|
||||
|
||||
private:
|
||||
noise_gen_t m_noise;
|
||||
const Params &m_params;
|
||||
arma::mat &m_w;
|
||||
arma::mat &m_bh;
|
||||
arma::mat &m_bv;
|
||||
|
||||
Reference in New Issue
Block a user