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

TypeError: forward() missing 1 required positional argument: 'x' #86

Open
berkanttubi opened this issue Sep 19, 2021 · 5 comments
Open

Comments

@berkanttubi
Copy link

Any solution ??

@berkanttubi
Copy link
Author

test_oneimage()
  File "/home/berkanttugberk/GithubProjects/FaceDetection-DSFD/demo.py", line 190, in test_oneimage
    det0 = infer(net , img , transform , thresh , cuda , shrink)
  File "/home/berkanttugberk/GithubProjects/FaceDetection-DSFD/demo.py", line 71, in infer
    y = net(x)      # forward pass
  File "/home/berkanttugberk/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 727, in _call
_impl
    result = self.forward(*input, **kwargs)
TypeError: forward() missing 1 required positional argument: 'x'

@liangpeng97
Copy link

Hello! Have you solved it? If it is solved, can you please tell me how to solve it? I also encountered such problems

@berkanttubi
Copy link
Author

@liangpeng97 I do not remember clearly now, but the problem was the torch version I think. The code is not working with the new versions of the pytorch

@liangpeng97
Copy link

@berkanttubi Thanks

@gkrisp98
Copy link

Hi! I am facing the same problem , does anyone have updated the code to be able to run on new PyTorch versions ?

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

3 participants