VITA-Group / EnlightenGAN

[IEEE TIP] "EnlightenGAN: Deep Light Enhancement without Paired Supervision" by Yifan Jiang, Xinyu Gong, Ding Liu, Yu Cheng, Chen Fang, Xiaohui Shen, Jianchao Yang, Pan Zhou, Zhangyang Wang
Other
890 stars 198 forks source link

why loss is nan #126

Open Kelsey2018 opened 2 years ago

Kelsey2018 commented 2 years ago

Hi, I have input data between 0 and 1, and at the first several epoches, the loss is normal, but then it turned to nan. I cannot find the errors,can you help me? in base_dataset.py transform_list += [transforms.ToTensor(), # normalized to [0, 1] transforms.Normalize((0, 0, 0), (1, 1, 1))] in util.py line 18 image_numpy = np.transpose(image_numpy, (1, 2, 0)) * 255.0