Thank you for your answer @ptrblck!
I tried using the C++ API for inference but it is not a feasible option due to technical issues with compilation.
I need to implement the inference process on a code based on CERN ROOT; something fails during the linking when trying to link both the Torch libraries (either pre-built of from source) and CERN ROOT and I’m therefore unable to use torch to implement the inference process on our code (you can find additional details here: Link to ROOT forum 2).
After a couple months of work I managed to compile CERN ROOT + Torch under gcc 4.8.5, which seems to be the only version of gcc that supports this combination of libraries; unfortunately, gcc 4.8.5 is not supported by our IT department.

  
      
      ROOT Forum – 1 Mar 19
  
  
    

Trouble with ROOT+libtorch make compilation 2

Dear Root forum members,  I am hitting a problem with cmake compilation and ROOT libraries.  I have followed the ROOT guide to create a CMakeLists for my code and I managed to have a compiled running code. (Here the guide that I have followed:...