zzzxxxttt / pytorch_simple_CenterNet_45

A simple pytorch implementation of CenterNet (Objects as Points)
308 stars 63 forks source link

想要指定4,5,6,7这几张GPU进行训练该怎么设置 #23

Open philiperss opened 4 years ago

philiperss commented 4 years ago

你好,python -m torch.distributed.launch --nproc_per_node NUM_GPUS train.py 这里我为NUM_GPUS为4的话,自动用的是前4张卡,那我如果想用后4张卡该怎么设置呢?

zzzxxxttt commented 4 years ago

try this

export CUDA_VISIBLE_DEVICES=4,5,6,7
python ... ...
philiperss commented 4 years ago

try this

export CUDA_VISIBLE_DEVICES=4,5,6,7
python ... ...

谢谢哦,解决了

sunshehai commented 2 years ago

@zzzxxxttt 您好,单卡训练时可以指定GPU1卡,而不用0卡吗?因为0卡跑着别的程序,但是程序一直默认0卡训练。我在命令行按照您所提示的反映有问题

zzzxxxttt commented 2 years ago

@zzzxxxttt 您好,单卡训练时可以指定GPU1卡,而不用0卡吗?因为0卡跑着别的程序,但是程序一直默认0卡训练。我在命令行按照您所提示的反映有问题

export CUDA_VISIBLE_DEVICES=1
python train.py ...