#1447·ggml

尝试在 `mnist_model_init_from_file` 中返回一个局部变量

作者: vtpx创建于 2026年3月28日更新于 2026年9月24日

在 mnist-common.cpp:132 中声明了一个局部变量 model:

cpp
mnist_model mnist_model_init_from_file(const std::string & fname, const std::string & backend, const int nbatch_logical, const int nbatch_physical) {
    mnist_model model(backend, nbatch_logical, nbatch_physical);

最后,该变量直接返回了(mnist-common.cpp:238)。