mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
use equal initial weights
This commit is contained in:
parent
6536a791ed
commit
9ded2c120c
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user