znxlwm / pytorch-CartoonGAN

Pytorch implementation of CartoonGAN (CVPR 2018)
MIT License
386 stars 74 forks source link

The loss of train is nan #16

Closed CeasonCui closed 3 years ago

CeasonCui commented 3 years ago

training start! [1/100] - time: 0.03, Disc loss: nan, Gen loss: nan, Con loss: nan [2/100] - time: 0.02, Disc loss: nan, Gen loss: nan, Con loss: nan [3/100] - time: 0.02, Disc loss: nan, Gen loss: nan, Con loss: nan [4/100] - time: 0.02, Disc loss: nan, Gen loss: nan, Con loss: nan [5/100] - time: 0.02, Disc loss: nan, Gen loss: nan, Con loss: nan ...

I tried different datasets, and the train loss is nan.

By the way, I see the warning that optimizer is before lr_scheduler, so I adjustment the order of the two. Could you tell me how to solve this problem? Thank you.