I am trying to understand the Tensor.size operation. Below is code snippet, and corresponding output of the print statements. I am not able to comprehend, what is happening when I use torch.Tensor(input.size()).
import torch
input = torch.Tensor([[1, 2, 3], [1, 2, 3]])
print(input.shape)
print(input.size())
print(torch.Tensor(input.shape))
print(torch.Tensor(input.size()))
torch.Size([2, 3])
torch.Size([2, 3])
tensor([[-7.9238e-35, 3.0887e-41, -7.9239e-35],
[ 3.0887e-41, 0.0000e+00, 0.0000e+00]])
tensor([[ 0.0000e+00, 0.0000e+00, 0.0000e+00],
[ 0.0000e+00, -7.8882e-35, 3.0887e-41]])
Thanks