initialize opt->loss_after with zero

This commit is contained in:
xaedes 2023-09-17 19:42:19 +02:00
parent 3b9d97484c
commit 5ce74ee461
No known key found for this signature in database
GPG key ID: 30030EDD817EA2B1

View file

@ -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;
}