Hi,
The short answer I would give here is: "If you just started pytorch, you should not touch .resize_()  "
It is a fairly tricky function that actually resize the data storage for a Tensor and can contain un-initialized memory.
If you want to change the shape of a Tensor (without changing the number of elements) you should use .view() or .reshape() !