torch.Tensor.resize_
- Tensor.resize_(*sizes, memory_format=torch.contiguous_format) → Tensor
Resizes
selftensor to the specified size. If the number of elements is larger than the current storage size, then the underlying storage is resized to fit the new number of elements. If the number of elements is smaller, the underlying storage is not changed. Existing elements are preserved but any new memory is uninitialized.