LiheYoung / UniMatch

[CVPR 2023] Revisiting Weak-to-Strong Consistency in Semi-Supervised Semantic Segmentation
https://arxiv.org/abs/2208.09910
MIT License
478 stars 60 forks source link

TypeError: ENet.forward() takes 2 positional arguments but 3 were given #66

Closed tanveer6715 closed 1 year ago

tanveer6715 commented 1 year ago

Hi,

I want to use other models instead of DeepLabV3+ using UniMatch approach but when ever I tried other models for training I got the above mentioned error. Would you help me what will be the possible reason for this error?

LiheYoung commented 1 year ago

I think you miss a need_fp=False argument in the forward function: https://github.com/LiheYoung/UniMatch/blob/583e32492b0ac150e0946b65864d2dcc642220b8/model/semseg/deeplabv3plus.py#L38

You also need to modify the forward function to deal with need_fp=True situation, similar to: https://github.com/LiheYoung/UniMatch/blob/583e32492b0ac150e0946b65864d2dcc642220b8/model/semseg/deeplabv3plus.py#L44-L50

tanveer6715 commented 1 year ago

I think you miss a need_fp=False argument in the forward function:

https://github.com/LiheYoung/UniMatch/blob/583e32492b0ac150e0946b65864d2dcc642220b8/model/semseg/deeplabv3plus.py#L38

You also need to modify the forward function to deal with need_fp=True situation, similar to:

https://github.com/LiheYoung/UniMatch/blob/583e32492b0ac150e0946b65864d2dcc642220b8/model/semseg/deeplabv3plus.py#L44-L50

Thank you. You are right.