Pytorch (pth) to libtorch (pt) conversion


I am currently working with deepspeech model, I was able to convert the model into libtorch, and also to try out the model in c++, but I am facing an issue, I feel it could be a lack of understanding when I convert the model, so maybe someone can guide me.

When converting the pth to pt from python you need to pass the tensor input example, but my understanding is then the pt file contains some folder Constants matching the exact input, then when I call the forward from C++ its seems using the exact same value of the input used when doing the conversion.

  1. Do I forgot something when converting the model ? Is there anyway to not generate this Constants ?

  2. I can unzip the pt file and I would like to add some print or something in order to debug the different value during the forward, is it possible to do that ? I tried a print in python but not working.

Thanks for feedback.