bug fix: init model when no checkpoint was loaded

This commit is contained in:
xaedes 2023-08-28 01:48:21 +02:00
parent 4882ff0c59
commit 152cfaac36
No known key found for this signature in database
GPG key ID: 30030EDD817EA2B1

View file

@ -2594,6 +2594,9 @@ int main(int argc, char ** argv) {
printf("%s: init model\n", __func__);
bool existed = load_checkpoint_file(params.fn_checkpoint_in, &model, opt);
if (!existed) {
init_model(&model);
}
set_param_model(&model);
opt->params = params.use_adam ? opt_params_adam : opt_params_lbfgs;