From 7b9035720ad197213a7827505ecbf40cd9851f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Sun, 15 Sep 2024 10:48:39 +0200 Subject: [PATCH] add clarifying comment --- examples/mnist/mnist-common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/mnist/mnist-common.cpp b/examples/mnist/mnist-common.cpp index fcacd5ac5..1453cfb14 100644 --- a/examples/mnist/mnist-common.cpp +++ b/examples/mnist/mnist-common.cpp @@ -565,7 +565,7 @@ void mnist_model_train(mnist_model & model, const float * images, const float * ggml_backend_graph_compute(model.backend, gb_grad); } else { // For the last iteration, calculate gradients and also apply the optimizer: - ggml_backend_graph_compute(model.backend, gb_opt); + ggml_backend_graph_compute(model.backend, gb_opt); // gb_opt contains all nodes of gb_grad so no extra call for gb_grad is needed. ggml_graph_reset(gb_grad); // Set gradients to zero, do not reset optimizer. }