use equal initial weights

This commit is contained in:
Krishna Vedala 2020-05-31 07:49:29 -04:00
parent 6536a791ed
commit 9ded2c120c

View File

@ -53,8 +53,8 @@ class adaline {
1); // additional weight is for the constant bias term 1); // additional weight is for the constant bias term
// initialize with random weights in the range [-50, 49] // initialize with random weights in the range [-50, 49]
for (int i = 0; i < weights.size(); i++) for (int i = 0; i < weights.size(); i++) weights[i] = 1.f;
weights[i] = (static_cast<double>(std::rand() % 100) - 50); // weights[i] = (static_cast<double>(std::rand() % 100) - 50);
} }
/** /**