Solved by albanD in post #13 
              
              
                Is it possible to resize a buffer after it has been declared? 

Yes, you can do .resize_(). Note that the content of the Tensor will be un-initialized though. So you need to make sure that you either zero it or write some value before using it. 

And additionally is it possible to add a buffer afte…