.view is way way safer than .resize and there are hardly any cases when .resize should be used in user scripts. It will raise an error if you try to get a tensor with a different number of elements, or if it’s not contiguous (.resize can give you a tensor that views on a data that wasn’t used before).