Ha0Tang / C2GAN

[ACM MM 2019 Oral] Cycle In Cycle Generative Adversarial Networks for Keypoint-Guided Image Generation
http://disi.unitn.it/~hao.tang/project/C2GAN.html
Other
69 stars 5 forks source link

RuntimeError: uniform_ expects to return a [from, to) range, but found from=1 > to=0.02 #3

Closed Ella77 closed 4 years ago

Ella77 commented 4 years ago

Thank you for your great repository!

I encountered error in networks RuntimeError: uniform_ expects to return a [from, to) range, but found from=1 > to=0.02

some range transformation needed to solve this issue

but I guess this could be something related to pytorch version error but same error appears on pytorch 0.4.1 :(

Ha0Tang commented 4 years ago

Would you provide more details?

Ella77 commented 4 years ago

I guess it is just simple error regarding pytorch version (not working in 0.4.1+)

Replace init.uniform(m.weight.data, 1.0, 0.02) with init.uniform(m.weight.data, 0.02, 1.0) in models/networks.py resolves this issue.

Ha0Tang commented 4 years ago

Great.