Skip to content

Commit

Permalink
initialize opt->loss_after with zero
Browse files Browse the repository at this point in the history
  • Loading branch information
xaedes committed Sep 17, 2023
1 parent 3b9d974 commit 5ce74ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/train.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct train_state * init_train_state() {
state->opt = new struct ggml_opt_context;
state->opt->ctx = NULL;
state->opt->params = ggml_opt_default_params(GGML_OPT_ADAM);
state->opt->loss_after = 0.0f;

return state;
}
Expand Down

0 comments on commit 5ce74ee

Please sign in to comment.