I am testing a cpp api and trying to load the .pt files which trained in python and saved there. My problem is that it stuck at loading it, in the exact this line module = torch::jit::load(model_path); (mode_path is string variable and is path to my .pt) I do not have graphics card and I only use CPU version of both of them. There is no error or error log to share with you, It only stops at the loading without any error. Do you have any idea? I have checked the compatibility of my Pytorch in python and cpp api, I have checked the python saving problems and it was correct and correctly saved I have checked the path to the .pt file, I have checked that dlls are in the correct folder and is there any missing but everything is okay and so as my cmake file int main() { torch::jit::script::Module module; try { const std::string model_path = "simple_net.pt"; module = torch::jit::load(model_path); torch::Tensor input = torch::rand({1, 4}); std::vector<torch::jit::IValue> inputs; inputs.push_back(input); torch::Tensor output = module.forward(inputs).toTensor(); std::cout << "Output: " << output << std::endl; } catch (const c10::Error &e) { std::cerr << "Error loading the model: " << e.what() << std::endl; return -1; } return 0; } Continue reading...