NVlabs / denoising-diffusion-gan

Tackling the Generative Learning Trilemma with Denoising Diffusion GANs https://arxiv.org/abs/2112.07804
Other
679 stars 75 forks source link

why cannot “from score_sde.models.discriminator import Discriminator_small, Discriminator_large” #32

Open Arkymeng opened 1 year ago

Arkymeng commented 1 year ago

Hi everyone!My python is 3.8 and torch is 1.8. When my "train_ddgan.py" run into “from score_sde.models.discriminator import Discriminator_small, Discriminator_large”,nothing happens and program cannot continue. Why can't I successfully import? please give me some help!

Arkymeng commented 1 year ago

This problem has been solved by adjusting the version of gcc and g++! W$4X}2GDLBC`RA0GOU%DY36

clydmn commented 1 year ago

Excuse me, I also have a similar problem. My g++version is 5.4.0, which is within the version range provided by you, but it cannot be imported. What is your specific solution? Would you please provide details?

Arkymeng commented 1 year ago

There are mang versions of g++ and gcc In my ubuntu. I just adjust the priority of them, giving the gcc 9 and g++ 9 "100". Hope the following can help u. step1 install gcc9,g++9 sudo apt-get install g++-9 gcc-9 step2 set priority sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100 step3 sudo update-alternatives --config gcc sudo update-alternatives --config g++ step4 gcc -v g++ -v