Pytorch .to('cuda') or .cuda() doesn't work and just get stuck
I am trying to do pytorch tutorial. When I try to set their device as cuda, it does not work and my code running get stuck.

For specific information, I am using conda environment of 
python 3.7.3
pytorch 1.3.0
cuda 10.2 (NVIDIA RTX2080TI)

&gt;&gt;&gt; import torch
&gt;&gt;&gt; torch.cuda.is_available()
True
&gt;&gt;&gt; torch.cuda.device_count()
1
&gt;&gt;&gt; torch.cuda.current_device()
0
&gt;&gt;&gt; device = torch.device('cuda:0')
&gt;&gt;&gt; device
device(type='cuda', index=0)
&gt;&gt;&gt; aa = torch.randn(5)
&gt;&gt;&gt; aa = tensor([-2.2084, -0.2700, 0.0921, -1.7678, 0.7642])
&gt;&gt;&gt; aa.to(device)


nothing happens...


Can anybody please help me how to overcome this problem?

This has happened with the Pytorch 1.3.0 release (the release was this week). I too face this bug. Basically, when I call .to(device), it just hangs and does nothing.

If you would like to fix this temporarily, you can downgrade to PyTorch 1.2.0. To do this, I ran:

conda install pytorch=1.2.0 torchvision cudatoolkit=10.2 -c pytorch


I would have just commented but I do not have enough reputation to do that. 
