AshwinRJ / Federated-Learning-PyTorch

Implementation of Communication-Efficient Learning of Deep Networks from Decentralized Data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError: Invalid device string: '0'

TatShri opened this issue · comments

There are two solutions:

  • Using the option --gpu=cuda:0 instead of --gpu=0
  • Or update the code torch.cuda.set_device(args.gpu) with torch.cuda.set_device(int(args.gpu))