NiccoloCavagnero / PEM

PEM: Prototype-based Efficient MaskFormer for Image Segmentation
https://niccolocavagnero.github.io/PEM/
66 stars 4 forks source link

Default process group has not been initialized #10

Closed Dream-swift closed 1 month ago

Dream-swift commented 1 month ago

my gpu is 3070m with windows. When start train it show RuntimeError: Default process group has not been initialized, please make sure to call init_process_group. I use the row from README : `python train_net.py --num-gpus 0 --config-file configs/cityscapes/semantic-segmentation/pem_R50_bs32_90k.yaml``` So how can I solute this? image

NiccoloCavagnero commented 1 month ago

We have never tested the code on Windows, nonetheless I think you should specify "--num-gpus 1" if you have a single GPU.

Dream-swift commented 1 month ago

We have never tested the code on Windows, nonetheless I think you should specify "--num-gpus 1" if you have a single GPU.

I try use "--num-gpus 1" but still output this mistake

NiccoloCavagnero commented 1 month ago

Possibly, this issue is related to the use of SyncBatchNorm which expect multiple GPUs. You can try to convert all SyncBatchNorm layers to standard BatchNorm and it should work.

You have an option to do so in the configuration files, but SyncBatchNorm is actually hardcoded in the Transformer Decoder so you have to manually change those.

Dream-swift commented 1 month ago

Possibly, this issue is related to the use of SyncBatchNorm which expect multiple GPUs. You can try to convert all SyncBatchNorm layers to standard BatchNorm and it should work.

You have an option to do so in the configuration files, but SyncBatchNorm is actually hardcoded in the Transformer Decoder so you have to manually change those.

Thank you! I change all places where SyncBatchNorm appears, and now I can continue