-autoscale of data during draw. data remains unchanged
git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@41 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -859,25 +859,7 @@ void MainComponent::redrawReconstruction()
|
||||
void MainComponent::redrawWeights(int index)
|
||||
{
|
||||
VectorXd w = m_weights.weights().col(index);
|
||||
VectorXd temp = w;
|
||||
double min = +1E12;
|
||||
double max = -1E12;
|
||||
|
||||
for (int i=0; i < m_vNumX*m_vNumY; i++)
|
||||
{
|
||||
min = std::min<double>(min, (double)temp[i]);
|
||||
max = std::max<double>(max, (double)temp[i]);
|
||||
}
|
||||
for (int i=0; i < m_vNumX*m_vNumY; i++)
|
||||
{
|
||||
temp[i] -= min;
|
||||
}
|
||||
for (int i=0; i < m_vNumX*m_vNumY; i++)
|
||||
{
|
||||
temp[i] /= (max-min);
|
||||
}
|
||||
|
||||
DrawWeights->setData(temp);
|
||||
DrawWeights->setData(w);
|
||||
}
|
||||
|
||||
void MainComponent::run()
|
||||
|
||||
Reference in New Issue
Block a user