torch.cuda.ava

import torch
>>> torch.cuda.is_available
<function is_available at 0x7f4241601320>
>>> torch.cuda.is_available()
/home/illusion/anaconda3/lib/python3.7/site-packages/torch/cuda/__init__.py:80: UserWarning: CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at  ../c10/cuda/CUDAFunctions.cpp:112.)
  return torch._C._cuda_getDeviceCount() > 0
False