Unable to create torch.cuda.FloatTensor

Hello all
I’m unable to create a torch.cuda.FloatTensor. Please respond if you have any idea.

>>> temp = torch.cuda.FloatTensor(10, 10).fill_(0)
>>> type(temp)
   <class 'torch.Tensor'>

I use Tesla K80 GPU AWS instance, pytorch version 0.4.0 and python 3. Thank you.

That is expected, all tensors are of type torch.Tensor.
You can use .type() to get a more precise type. And attributes like .is_cuda.

1 Like