Solved by tom in post #2 
              
              
                LibTorch tracks the lifetime of your tensors (except when you use from_blob, in which case your tensors don’t own the memory), so you would not need to delete them except letting them go out of scope. 
Best regards 
Thomas