mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-15 03:10:07 +08:00
use equal initial weights
This commit is contained in:
@@ -53,8 +53,8 @@ class adaline {
|
||||
1); // additional weight is for the constant bias term
|
||||
|
||||
// initialize with random weights in the range [-50, 49]
|
||||
for (int i = 0; i < weights.size(); i++)
|
||||
weights[i] = (static_cast<double>(std::rand() % 100) - 50);
|
||||
for (int i = 0; i < weights.size(); i++) weights[i] = 1.f;
|
||||
// weights[i] = (static_cast<double>(std::rand() % 100) - 50);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user