- improved RBM
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@567 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+14
-6
@@ -24,21 +24,25 @@ public:
|
||||
struct Params
|
||||
{
|
||||
Params()
|
||||
: m_weightDecay(0.0)
|
||||
: m_weightInit(0.01)
|
||||
, m_weightDecay(0.0)
|
||||
, m_learningRate(0.1)
|
||||
, m_momentum(0.5)
|
||||
, m_doRaoBlackwell(true)
|
||||
, m_doSampleVisible(false)
|
||||
, m_gibbsDoSampleVisible(false)
|
||||
, m_gibbsDoSampleHidden(false)
|
||||
, m_doSampleBatch(false)
|
||||
, m_numGibbs(1)
|
||||
, m_numGibbs(5)
|
||||
{
|
||||
}
|
||||
|
||||
double m_weightInit;
|
||||
double m_weightDecay;
|
||||
double m_learningRate;
|
||||
double m_momentum;
|
||||
bool m_doRaoBlackwell;
|
||||
bool m_doSampleVisible;
|
||||
bool m_gibbsDoSampleVisible;
|
||||
bool m_gibbsDoSampleHidden;
|
||||
bool m_doSampleBatch;
|
||||
size_t m_numGibbs;
|
||||
};
|
||||
@@ -49,6 +53,7 @@ public:
|
||||
size_t trainingSizeRemain;
|
||||
double progress;
|
||||
double err;
|
||||
double err_total;
|
||||
double L1;
|
||||
double L2;
|
||||
};
|
||||
@@ -70,8 +75,11 @@ public:
|
||||
virtual ~Rbm();
|
||||
|
||||
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 toHiddenState(const arma::mat &visible);
|
||||
arma::mat toVisibleState(const arma::mat &hidden);
|
||||
arma::mat toHiddenProbs(const arma::mat &visible);
|
||||
arma::mat toVisibleProbs(const arma::mat &hidden);
|
||||
arma::mat& weights();
|
||||
arma::mat& bias_visible();
|
||||
arma::mat& bias_hidden();
|
||||
|
||||
Reference in New Issue
Block a user