I am training a LNN with pytorch 1.1.0 and using the training to perform an inference on C++.
Due to various compatibility issues with CERN ROOT (long story) I cannot use the C++ torch libraries, so I re-implemented the entire forward process in C++ using matrix algebra.
In order to do so, I wrote a python script to convert the training .pt file in three separate csv files (weights, biases, norm) to be fed to the C++ script. This works fine, but is obviously very annoying.
I want to directly load and deserialize the pytorch .pt model in C++ without using any torch-related library. I had a look at the source code for the load() function and it looks it is based on the pickle library, but I failed in loading the .pt file using pickle.
Could anyone help me understand how the deserialization process is performed in pytorch?