HRNet-Image-Classification icon indicating copy to clipboard operation
HRNet-Image-Classification copied to clipboard

How to train on single GPU

Open Chen65010445 opened this issue 4 years ago • 3 comments

For I don't have multi-GPUS, I changed the GPUS = (0,0,0,0), but this error came RuntimeError: inputs must be on unique devices. There is no doubt telling that this network working on more than one GPUS. So how do I change the code to run them on single GPU?

Chen65010445 avatar Aug 25 '20 03:08 Chen65010445

image Find your corresponding yaml file, and then change its GPUs number to a separate 0.

LvShuaiChao avatar Apr 30 '21 09:04 LvShuaiChao

Remove the GPUS: from the yaml file that you are using. By default GPU is set to 0. Refer: https://github.com/HRNet/HRNet-Image-Classification/blob/f760c988482cdb8a1f69b10b219d669721144582/lib/config/default.py#L23

piyushchauhan avatar May 07 '21 16:05 piyushchauhan

@piyushchauhan @LvShuaiChao Hi, have you done any other operations? I have just simply changed the GPUs but got the error: RuntimeError: Default process group has not been initialized, please make sure to call init_process_group. Do you know how to solve it?

HRHLALALA avatar Jul 21 '21 22:07 HRHLALALA