mit-han-lab / gan-compression

[CVPR 2020] GAN Compression: Efficient Architectures for Interactive Conditional GANs
Other
1.1k stars 148 forks source link

TypeError: _output_padding() missing 1 required positional argument: 'num_spatial_dims' #110

Closed dianxin556 closed 1 year ago

dianxin556 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

dianxin556 commented 1 year ago

Thanks,I will try.