I am currently using the tensor.resize() function to resize a tensor to a new shape t = t.resize(1, 2, 3).
t = t.resize(1, 2, 3)
This gives me a deprecation warning:
Please can you try something like:
import torch x = torch.tensor([[1, 2], [3, 4], [5, 6]]) print(":::",x.resize_(2, 2)) print("::::",x.resize_(3, 3))