From f439e506e8ae8b01df2ae2156380f8156d7553e3 Mon Sep 17 00:00:00 2001 From: Herman Semenov Date: Fri, 20 Oct 2023 10:02:12 +0000 Subject: ggml : fix rope + llama minor optimizations (#3560) * Minor fixes and fixed memleak * Using const auto references in range-based loop C++17 --- common/train.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/train.cpp') diff --git a/common/train.cpp b/common/train.cpp index 972eaefe..154ca56e 100644 --- a/common/train.cpp +++ b/common/train.cpp @@ -1425,7 +1425,7 @@ void train_opt_callback(void * vdata, int accum_step, float * sched, bool * canc int impr_plot = -(int)(1 + (opt->loss_before - opt->loss_after) * 10.0f + 0.5f); if (impr_plot > 0) impr_plot = 0; - if (std::isnan(opt->loss_before) || std::isnan(opt->loss_before)) impr_plot = 0; + if (std::isnan(opt->loss_before) || std::isnan(opt->loss_after)) impr_plot = 0; printf("%s: iter=%6d sample=%zu/%zu sched=%f loss=%f", __func__, opt->iter, std::min(1+train->shuffle_next_sample, train->shuffle_sample_count), train->shuffle_sample_count, *sched, opt->loss_after); -- cgit v1.2.3