e.g. torch.Tensor(3,4), I will get a matrix with shape of 3,4, and I notice that the mean of this matrix is 0, but the what is the specific initialization of this operation?
I would recommend to stick to the factory methods, e.g. torch.randn
, torch.rand
, torch.tensor([1, 2, 3])
etc.
torch.Tensor
will return an uninitialized FloatTensor
, which might be dangerous.
1 Like