[RBM]
- DrawComponent: use fixed value scaling - Rbm: fixed weight decay - Rbm: fixed sparsity git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@298 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+17
-2
@@ -44,7 +44,7 @@ RbmComponent::RbmComponent (Weights &weights, MatrixXd const &batch, RbmComponen
|
||||
DrawTraining->setListener(this);
|
||||
|
||||
addAndMakeVisible (DrawReconstruction = new DrawComponent (vNumX, vNumY));
|
||||
addAndMakeVisible (DrawWeights = new DrawComponent (vNumX, vNumY));
|
||||
addAndMakeVisible (DrawWeights = new DrawComponent (vNumX, vNumY, 0.5, 0.5));
|
||||
addAndMakeVisible (DrawVars = new DrawComponent (vNumX, vNumY));
|
||||
addAndMakeVisible (DrawHidden = new DrawComponent (hNum, 1));
|
||||
DrawHidden->setListener(this);
|
||||
@@ -55,7 +55,22 @@ RbmComponent::RbmComponent (Weights &weights, MatrixXd const &batch, RbmComponen
|
||||
|
||||
setSize (430, 130);
|
||||
resized();
|
||||
|
||||
|
||||
MatrixXd m = MatrixXd::Random(4,3);
|
||||
MatrixXd m2 = MatrixXd::Zero(4,3);
|
||||
cout << "Rows = " << m.rows() << ", cols = " << m.cols() << endl;
|
||||
cout << "m = " << endl << m << endl;
|
||||
cout << "max = " << endl << m.rowwise().maxCoeff() << endl;
|
||||
cout << "m.colwise().sum() = " << endl << m.colwise().sum() << endl;
|
||||
|
||||
for (MatrixXf::Index i=0; i < m.rows(); i++)
|
||||
{
|
||||
MatrixXf::Index j = 8;
|
||||
cout << "max = " << endl << m.row(i).maxCoeff(&j);
|
||||
cout << "at row = " << i << ", col = " << j << endl;
|
||||
m2(i, j) = m(i, j);
|
||||
}
|
||||
cout << "m2 = " << endl << m2 << endl;
|
||||
}
|
||||
|
||||
RbmComponent::~RbmComponent()
|
||||
|
||||
Reference in New Issue
Block a user