'Namespace' object has no attribute 'no_cuda'

I am using torch 0.4.1. I am getting the following error message:

File “main_horovod.py”, line 82, in
args.cuda = not args.no_cuda and torch.cuda.is_available()
AttributeError: ‘Namespace’ object has no attribute ‘no_cuda’

I am using most part of the code from main.py form github.

Hi,

This code is not part of pytorch’s codebase.
In this case, it seems that the args variable does not have a no_cuda attribute on line 82 of your file.