- vectorized logSigmoid() and gaussProb()

- added switch RBM_SPARSE
- added some experimental expect functions


git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@24 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2014-10-12 18:18:09 +00:00
parent 19c69ac02a
commit 0166b986cb
4 changed files with 95 additions and 51 deletions
+3 -1
View File
@@ -231,11 +231,13 @@ void DrawComponent::setData (const VectorXd& data)
{
double a;
m_data = data;
for (int i=0; i < m_height; i++)
{
for (int j=0; j < m_width; j++)
{
a = std::min<double>(std::max<double>((double)data[i*m_width + j], 0), 1);
a = std::min<double>(std::max<double>((double)m_data[i*m_width + j], 0), 1);
m_pG->setColour(Colour(Colours::white).greyLevel(a));
m_pG->fillRect(m_scaleX*j, m_scaleY*i, m_scaleX, m_scaleY);
}