facebookresearch / unbiased-teacher

PyTorch code for ICLR 2021 paper Unbiased Teacher for Semi-Supervised Object Detection
https://arxiv.org/abs/2102.09480
MIT License
415 stars 83 forks source link

TypeError: __init__() takes from 5 to 6 positional arguments but 7 were given #62

Closed devillove084 closed 3 years ago

devillove084 commented 3 years ago

Exception during training: Traceback (most recent call last): File "/home/ubuntu/Downloads/unbiased-teacher/ubteacher/engine/trainer.py", line 393, in train_loop self.run_step_full_semisup() File "/home/ubuntu/Downloads/unbiased-teacher/ubteacher/engine/trainer.py", line 491, in run_step_full_semisup recorddict, , , = self.model( File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, kwargs) File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 886, in forward output = self.module(*inputs[0], *kwargs[0]) File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(input, kwargs) File "/home/ubuntu/Downloads/unbiased-teacher/ubteacher/modeling/metaarch/rcnn.py", line 30, in forward , detector_losses = self.roi_heads( File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/home/ubuntu/Downloads/unbiased-teacher/ubteacher/modeling/roi_heads/roiheads.py", line 95, in forward losses, = self._forward_box( File "/home/ubuntu/Downloads/unbiased-teacher/ubteacher/modeling/roi_heads/roi_heads.py", line 123, in _forward_box losses = self.box_predictor.losses(predictions, proposals) File "/home/ubuntu/Downloads/unbiased-teacher/ubteacher/modeling/roi_heads/fast_rcnn.py", line 25, in losses losses = FastRCNNFocalLoss( File "/home/ubuntu/Downloads/unbiased-teacher/ubteacher/modeling/roi_heads/fast_rcnn.py", line 54, in init super(FastRCNNFocalLoss, self).init( TypeError: init() takes from 5 to 6 positional arguments but 7 were given