for normal saving and loading pytorch model is quite simple.
in python I can use torch.save(model, FilePath)
and in c++torch::jit::load(FilePath)
. and the saved model and c++ load code can be placed in one directory. However, there is a limitation that binary file cannot be contained in the directory in the production mode (Please don't ask me why the binary file cannot be contained, I also wondering).
So, I want to know how to save the pytorch model from python without serializtion and load this model in c++. Is it possible?