The torch.Tensor.type() method is deprecated. It was used to change the data type of a tensor. However, this method is no longer recommended because it can lead to unexpected results.
Changed the code snippet from using torch.Tensor.type(dtype=None) to tensor = tensor.to(torch.float32) for changing the datatype of tensors. @ line 2189 under the "Change tensor datatype" heading
The link to the documentation has been updated accordingly.
The torch.Tensor.type() method is deprecated. It was used to change the data type of a tensor. However, this method is no longer recommended because it can lead to unexpected results.
Changed the code snippet from using
torch.Tensor.type(dtype=None)
totensor = tensor.to(torch.float32)
for changing the datatype of tensors. @ line 2189 under the "Change tensor datatype" headingThe link to the documentation has been updated accordingly.