Solved by tom in post #5 
              
              
                This is what I meant with 

using from_blob requires you to keep the pointer array alive for the lifetime of the returned tensor. 

So you pass in a pointer to from_blob but PyTorch “not taking ownership” means that PyTorch doesn’t know where it comes from or tries to do anything with it. This mean…