By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account self.device = torch.device("cuda:{}".format(option['cuda_devices'][0]) TypeError: 'NoneType' object is not subscriptable 请问您这两个问题是怎么解决的呢? gpu = int(sys.argv[2])    IndexError: list index out of range 解决方案:sys.argv[2],说明需要两个参数,你没有输入参数,所以它报错了, 你在python xx.py arg1 arg 2. self.device = torch.device("cuda:{}".format(option['cuda_devices'][0]) TypeError: 'NoneType' object is not subscriptable 解决方案:option['cuda_devices'][0],说明你的option['cuda_devices'][0]为None ,你要设置一下 mazhichong ***@***.***> 于2021年10月21日周四 下午7:56写道: