DingXiaoH / RepVGG

RepVGG: Making VGG-style ConvNets Great Again
MIT License
3.3k stars 433 forks source link

Running example_pspnet.py generates an error: raise NotImplementedError #118

Closed fhf526 closed 6 months ago

fhf526 commented 6 months ago

You did a great job, but I found a bug when I went to run example_pspnet.py

Traceback (most recent call last): File "D:\Aipre\RepVGG-main\example_pspnet.py", line 141, in y_train = model(input) File "E:\anaconda3\envs\hooke_3.9\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl return forward_call(*input, *kwargs) File "D:\Aipre\RepVGG-main\example_pspnet.py", line 107, in forward x = self.layer1(x) File "E:\anaconda3\envs\hooke_3.9\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl return forward_call(input, **kwargs) File "E:\anaconda3\envs\hooke_3.9\lib\site-packages\torch\nn\modules\module.py", line 201, in _forward_unimplemented raise NotImplementedError NotImplementedError

fhf526 commented 6 months ago

I found the wrong reason: The return value of the_make_stage method in the repvgg.py file is return nn.ModuleList(blocks) Change it to return nn.Sequential(*blocks)