Solved by albanD in post #2 
              
              
                Hi, 
When you call from_blob, you tell the Tensor to use this content in memory but the Tensor does not “own” the memory! 
So it is your responsability to make sure that this memory is kept allocated as long as the Tensor lives. 
In your case, when you exit the scope, the std::vector is destructed a…