NVIDIA / semantic-segmentation

Nvidia Semantic Segmentation monorepo
BSD 3-Clause "New" or "Revised" License
1.76k stars 388 forks source link

How to run the code with one GPU #139

Open xinghaoxinghao opened 3 years ago

xinghaoxinghao commented 3 years ago

In fact, i only have one GPU.So if i want to run inference and dump images on a folder of images,what part of the code do I need to change.

ajtao commented 3 years ago

it already assumes 1 gpu. https://github.com/NVIDIA/semantic-segmentation/blob/main/scripts/dump_cityscapes.yml#L3

xinghaoxinghao commented 3 years ago

it already assumes 1 gpu. https://github.com/NVIDIA/semantic-segmentation/blob/main/scripts/dump_cityscapes.yml#L3

Yes, there are still errors after I execute the file. image

ajtao commented 3 years ago

Hi @xinghaoxinghao.

Try to run the training command manually. i.e. run everything after "exec", so

python -m torch.distributed.launch --nproc_per_node=1 train.py --dataset cityscapes --cv0 ...

Another thing to try is to make sure your LOGDIR is defined with an absolute path.

xinghaoxinghao commented 3 years ago

Hi @xinghaoxinghao.

Try to run the training command manually. i.e. run everything after "exec", so

python -m torch.distributed.launch --nproc_per_node=1 train.py --dataset cityscapes --cv0 ...

Another thing to try is to make sure your LOGDIR is defined with an absolute path.

thank you I encountered such a problem after following your advice. ![Uploading image.png…]()

xinghaoxinghao commented 3 years ago

Hi @xinghaoxinghao.

Try to run the training command manually. i.e. run everything after "exec", so

python -m torch.distributed.launch --nproc_per_node=1 train.py --dataset cityscapes --cv0 ...

Another thing to try is to make sure your LOGDIR is defined with an absolute path.

thank you I encountered such a problem after following your advice image

ajtao commented 3 years ago

Well it obviously looks like you have a problem with your apex installation. You're going to have to debug that yourself.

raghu30213 commented 3 years ago

Hey I tried running with one GPU of 8GB but am running out of memory.

Screen Shot 2021-06-15 at 3 38 12 AM