|
@@ -149,7 +149,6 @@ void mlp_backward(const std::vector<double> &input,
|
|
|
}
|
|
|
for (int i = 0; i < n_hidden_1; ++i)
|
|
|
{
|
|
|
-
|
|
|
b1[i] -= d_b1[i];
|
|
|
for (int j = 0; j < n_input; ++j)
|
|
|
{
|
|
@@ -178,7 +177,7 @@ int main()
|
|
|
// init
|
|
|
std::random_device rd;
|
|
|
std::mt19937 gen(rd());
|
|
|
- std::uniform_real_distribution<> dis(0.0, 1.0);
|
|
|
+ std::uniform_real_distribution<> dis(-1.0, 1.0);
|
|
|
for (int i = 0; i < n_hidden_1; ++i)
|
|
|
{
|
|
|
|