Solved by Jakov_Gaspar in post #4 
              
              
                Found the solution. You can use the torch::from_blob() function to read an array and turn it to a tensor. Apparently you also need to call .clone() because of some memory issue.