fix cuda default value (#1051)
This commit is contained in:
parent
8477aa8ec3
commit
0cda9b8757
|
@ -74,7 +74,7 @@ class SimpleReader(object):
|
|||
|
||||
def get_device_num():
|
||||
if self.use_gpu:
|
||||
gpus = os.environ.get("CUDA_VISIBLE_DEVICES", 1)
|
||||
gpus = os.environ.get("CUDA_VISIBLE_DEVICES", "1")
|
||||
gpu_num = len(gpus.split(','))
|
||||
return gpu_num
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue