lzx1413 / PytorchSSD

pytorch version of SSD and it's enhanced methods such as RFBSSD,FSSD and RefineDet
MIT License
709 stars 237 forks source link

How to specify a gpu to train? #81

Closed sagittahjz closed 5 years ago

sagittahjz commented 5 years ago

I have tried the following codes

os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"] = "6"

torch.cuda.set_device(6)

but it always used GPU0

sagittahjz commented 5 years ago

attach CUDA_VISIBLE_DEVICES=6 to the beginning of train.sh is useful

but why the other ways I mentioned were useless?

lzx1413 commented 5 years ago

It is the problem of pytorch that always use the first gpu as the master gpu.