Skip to content

Commit

Permalink
uncomment
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewldesousa committed Jul 6, 2024
1 parent 923c27f commit eba97de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/and.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ int main(int argc, char** argv) {
for (int j = 0; j < num_samples; j++) {
auto z = weights[0] * X[j][0] + weights[1] * X[j][1] + weights[2];
auto a = sigmoid(z);
// loss = cross_entropy(Y[j], a) + loss;
loss = cross_entropy(Y[j], a) + loss;
}

// loss = loss / Scalar<double>::make(num_samples);
// loss->backward();
loss = loss / Scalar<double>::make(num_samples);
loss->backward();

// update weights
for (int j = 0; j < weights.size(); j++) {
Expand Down

0 comments on commit eba97de

Please sign in to comment.