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 - Missing Required Positional Argument in Custom PyTorch Model Training #82

Open
Zhangzqing opened this issue Nov 10, 2023 · 7 comments

Comments

@Zhangzqing
Copy link

I am attempting to train a condition generator model using the train_condition.py script from the HR-VITON project, but I am encountering the following error:

TypeError: forward() missing 1 required positional argument: 'input2'

The error occurs when executing the command:

python train_condition.py --cuda True --gpu_ids 0 --Ddownx2 --Ddropout --lasttvonly --interflowloss --occlusion

I have confirmed that the parameters input1 and input2 passed to the forward() method of the tocg model are correctly initialized and contain the correct data. I am using PyTorch version [Your PyTorch version] and Python version [Your Python version].

Does anyone have any suggestions on how to resolve this issue?

@meetncl
Copy link

meetncl commented Nov 29, 2023

I am also facing the same issue, did you solved it ??

@Zhangzqing
Copy link
Author

Zhangzqing commented Nov 29, 2023 via email

@meetncl
Copy link

meetncl commented Nov 30, 2023

Hey you contact me on X: @MeetNagadia or Mail: meetn@coutloot.com

@a-meal-is-not-enough
Copy link

Have you solved this problem? my friends!

@Manish989927
Copy link

this help you to understand the problems

@Zhangzqing
Copy link
Author

Zhangzqing commented Apr 5, 2024 via email

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

4 participants