Skip to content

Commit c765c8f

Browse files
committed
mnist : adapt to opt changes
ggml-ci
1 parent b67cf06 commit c765c8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/mnist/mnist-common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ ggml_opt_result_t mnist_model_eval(mnist_model & model, ggml_opt_dataset_t datas
411411

412412
void mnist_model_train(mnist_model & model, ggml_opt_dataset_t dataset, const int nepoch, const float val_split) {
413413
ggml_opt_fit(model.backend_sched, model.ctx_compute, model.images, model.logits, dataset,
414-
GGML_OPT_LOSS_TYPE_CROSS_ENTROPY, ggml_opt_get_default_optimizer_params, nepoch, model.nbatch_logical, val_split, false);
414+
GGML_OPT_LOSS_TYPE_CROSS_ENTROPY, GGML_OPT_OPTIMIZER_TYPE_ADAMW, ggml_opt_get_default_optimizer_params, nepoch, model.nbatch_logical, val_split, false);
415415
}
416416

417417
void mnist_model_save(mnist_model & model, const std::string & fname) {

0 commit comments

Comments
 (0)