can't convert pytorch tensor dtype from float64 to double
I need to convert an int to a double tensor, and I've already tried several ways including torch.tensor([x], dtype=torch.double), first defining the tensor and then converting the dtype to double with x_tensor.double(), and also defining the tensor with torch.DoubleTensor([x]) but none actually change the dtype from torch.float64. Here's the code snippet
&gt;&gt;&gt; x = 6
&gt;&gt;&gt; x = torch.tensor([x], dtype=torch.double)
&gt;&gt;&gt; x
tensor([6.], dtype=torch.float64)

&gt;&gt;&gt; x = 6
&gt;&gt;&gt; x_tensor = torch.Tensor([x])
&gt;&gt;&gt; x_double = x_tensor.double()
&gt;&gt;&gt; x_double
tensor([6.], dtype=torch.float64)

&gt;&gt;&gt; x_tensor = torch.DoubleTensor([x])
&gt;&gt;&gt; x_tensor
tensor([6.], dtype=torch.float64)

Any ideas as to why it's not converting?

It is converting; torch.float64 and torch.double are the same thing
