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: _output_padding() missing 1 required positional argument: 'num_spatial_dims' #110

Closed
dianxin556 opened this issue Nov 28, 2022 · 4 comments

Comments

@dianxin556
Copy link

dianxin556 commented Nov 28, 2022

when I run the script train_supernet.sh in the fast gan compression,it occurs an error " TypeError: _output_padding() missing 1 required positional argument: 'num_spatial_dims'".
image
and the task script is "bash scripts/cycle_gan/horse2zebra_fast/train_supernet.sh"

@lmxyy
Copy link
Collaborator

lmxyy commented Nov 28, 2022

Hi, this issue seems to be caused by the inconsistent PyTorch version. Our code is tested on PyTorch 1.4. Could you specify your PyTorch version?

@lmxyy
Copy link
Collaborator

lmxyy commented Nov 28, 2022

From the latest PyTorch1.13 document, this can by fixed by changing this line to

num_spatial_dims = 2
output_padding = self._output_padding(x, output_size, self.stride, self.padding, self.kernel_size, num_spatial_dims, self.dilation)

@lmxyy lmxyy closed this as completed Dec 6, 2022
@lmxyy
Copy link
Collaborator

lmxyy commented Dec 6, 2022

As there are no more replies, I will close this issue.

@dianxin556
Copy link
Author

Thanks,I will try.

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

2 participants