From 5ce74ee4613c06bf3391c72d7115d10726200bff Mon Sep 17 00:00:00 2001 From: xaedes Date: Sun, 17 Sep 2023 19:42:19 +0200 Subject: [PATCH] initialize opt->loss_after with zero --- common/train.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/train.cpp b/common/train.cpp index 10e0107eb..3e8b1427f 100644 --- a/common/train.cpp +++ b/common/train.cpp @@ -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; }