Hi,
Can anybody tell me how the tensors that are created by ‘torch.Tensor’ are initialized ? Since I witnessed some huge numbers occured in the tensor that generated by torch.Tensor
.
For example, using torch.Tensor(3, 64)
I got
The version of PyTorch is 1.0.1.
torch.Tensor
won’t initialize the data using a specific scheme, but rather returns an uninitialized tensor.
Whatever was stored in the RAM before allocating the tensor will be interpreted as the dtype
.
I would recommend to initialize your tensors using torch.tensor
, torch.ones
, etc.
Wow… Thank you so much @ptrblck.