Hi @mhubii



 mhubii:

for (auto& p : MySequential->named_parameters()) { // Access key. std::cout << p.key() << std::endl; // Access value. std::cout << p.value() << std::endl; }


I’m expecting some prints to be displayed on the console so that I will be sure the Model is loaded fine.
But I’m not getting the print for p.key() and p.value(). Which makes me think the model loaded using torch::load() , didn’t happen as expected.
If I’m not asking too much can you please tryout the MNIST example try to store and load the model model which we are discussing here? Storing is working fine. As I see that file is generated and it is around 2MB in size. But I’m facing difficulty with the torch::load(). Not able to verify if the model is loaded from stored file or not.