Skip to content

Commit

Permalink
thread sanitizer
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewldesousa committed Jul 3, 2024
1 parent 28a810a commit fdbf106
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/and.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ int main(int argc, char** argv) {
if (argc > 1 && std::string(argv[1]) == "debug") Logger::get_instance().set_debug_mode(true);
else if (argc > 1) throw std::runtime_error("Invalid argument in main function. Use 'debug' to enable debug mode.");

int num_epochs = 500000, num_samples = 4;
int num_epochs = 50000, num_samples = 4;
float learning_rate = 0.001;

// weights shared pointer
Expand Down Expand Up @@ -51,7 +51,7 @@ int main(int argc, char** argv) {
loss = cross_entropy(Y[j], a) + loss;
}

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

// update weights
Expand Down

0 comments on commit fdbf106

Please sign in to comment.