Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forward() takes from 3 to 4 positional arguments but 5 were given #61

Open
chyphen7 opened this issue Mar 1, 2022 · 0 comments
Open

Comments

@chyphen7
Copy link

chyphen7 commented Mar 1, 2022

I am trying to run "python demo/fcos_demo.py", but get the following errors.

(FCOS) PS G:\DeepLearning\segmentation\SipMask\SipMask-benchmark> python demo/fcos_demo.py
Traceback (most recent call last):
File "G:\DeepLearning\segmentation\SipMask\SipMask-benchmark\demo\fcos_demo.py", line 109, in
main()
File "G:\DeepLearning\segmentation\SipMask\SipMask-benchmark\demo\fcos_demo.py", line 101, in main
composite = coco_demo.run_on_opencv_image(img)
File "G:\DeepLearning\segmentation\SipMask\SipMask-benchmark\demo\predictor.py", line 172, in run_on_opencv_image
predictions = self.compute_prediction(image)
File "G:\DeepLearning\segmentation\SipMask\SipMask-benchmark\demo\predictor.py", line 205, in compute_prediction
predictions = self.model(image_list)
File "D:\anaconda3\envs\FCOS\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "g:\deeplearning\segmentation\sipmask\sipmask-benchmark\fcos_core\modeling\detector\generalized_rcnn.py", line 51, in forward
proposals, proposal_losses = self.rpn(images, features, imge_metas, targets)
File "D:\anaconda3\envs\FCOS\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
TypeError: forward() takes from 3 to 4 positional arguments but 5 were given

I am wondering if it is related to incompatibility of torch version or something else? Can anybody help?

Thanks,
Chien

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant