Traffic-X / ViT-CoMer

Official implementation of the CVPR 2024 paper ViT-CoMer: Vision Transformer with Convolutional Multi-scale Feature Interaction for Dense Predictions.
Apache License 2.0
231 stars 16 forks source link

怎么设置单机单卡训练? #10

Closed YooWang closed 7 months ago

YooWang commented 7 months ago

非常感谢您的工作,我尝试用单机单卡训练,但是碰到了如下问题: RuntimeError: Default process group has not been initialized, please make sure to call init_process_group. 这个好像是分布式训练错误会遇到的问题。 请问怎么设置单机单卡训练呢?

Tom-Dongfang commented 6 months ago

非常感谢您的工作,我尝试用单机单卡训练,但是碰到了如下问题: RuntimeError: Default process group has not been initialized, please make sure to call init_process_group. 这个好像是分布式训练错误会遇到的问题。 请问怎么设置单机单卡训练呢?

你好,我也遇到了同样的问题,请问你是如何解决的?

YooWang commented 6 months ago
    self.norm1 = nn.SyncBatchNorm(embed_dim)

https://github.com/Traffic-X/ViT-CoMer/blob/c5bc9848b7b8f730b1a3ccc233a6d0b76279f638/detection/mmdet_custom/models/backbones/vit_comer.py#L59C18-L60C19 主干网络里面,默认使用了SyncbatchNorm,有几处需要手动更改的,好像在config中无法修改这部分,默认得多卡训练,单卡的话,找到这些改掉SyncBatchNorm就可以了。

Tom-Dongfang commented 6 months ago
    self.norm1 = nn.SyncBatchNorm(embed_dim)

https://github.com/Traffic-X/ViT-CoMer/blob/c5bc9848b7b8f730b1a3ccc233a6d0b76279f638/detection/mmdet_custom/models/backbones/vit_comer.py#L59C18-L60C19 主干网络里面,默认使用了SyncbatchNorm,有几处需要手动更改的,好像在config中无法修改这部分,默认得多卡训练,单卡的话,找到这些改掉SyncBatchNorm就可以了。

感谢!