langmanbusi / Semantic-Aware-Low-Light-Image-Enhancement

Semantic-Aware LLIE. CVPR 2023
MIT License
189 stars 7 forks source link

Error at calculate_loss_G #3

Closed zyy317077 closed 2 months ago

zyy317077 commented 1 year ago

Dear author, Error at calculate_loss_G in line 179 of the file DRBN_SKF/trainer_seg_hist_fuse.py, Is the input model_D correct here? I would greatly appreciate it if you could provide me with an answer

langmanbusi commented 1 year ago

As shown in GAN, loss_G (update generator) and loss_D (update discriminator) are both calculated by discriminator (model_D), only the objective functions are different.

zyy317077 commented 1 year ago

Thank you for your answer! However, fake_label = model_D(torch.cat([out, seg_map])) in line 451 of D_Net.py, concating both dimension 0 and dimension 1 will result in errors. How should I modify it?

langmanbusi commented 1 year ago

I update the code and you can check it.

zyy317077 commented 1 year ago

Thank you once again!