>>> import torch >>> torch.cuda.current_device() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/hogehoge/yes/envs/gpu_test/lib/python3.7/site-packages/torch/cuda/__init__.py", line 479, in current_device _lazy_init() File "/home/hogehoge/yes/envs/gpu_test/lib/python3.7/site-packages/torch/cuda/__init__.py", line 208, in _lazy_init raise AssertionError("Torch not