DGMR-pytorch icon indicating copy to clipboard operation
DGMR-pytorch copied to clipboard

train.py issue

Open ZHANGZ1YUE opened this issue 2 years ago • 3 comments

Hi! Thank you very much for this implementation! I have a question regarding the train.py script. From line 215 for img in pbar, I wonder do you mean for batch in pbar? As img is not being used later and batch is the one that gives img_x and img_y.

ZHANGZ1YUE avatar Sep 12 '22 05:09 ZHANGZ1YUE

Thanks for your comment! Your suggestion is correct! It should be for batch in pbar rather than for img in pbar. Also, I recently updated the code that wraps the training process into the trainer. More details will be implemented in the future!

hyungting avatar Sep 19 '22 06:09 hyungting

Hi! Thank you for the reply and update to this implementation. Besides, I have experienced some training difficulties even I fixed the img pbar problem for this model (before your current update). It seems that the discriminator is not training at all, while the generator completely relying on the pixel-wise loss. (The discriminator loss is always tiny compared with pixel wise loss, and is not training properly). I am wondering if you could achieve some good results with it? If you could, what does the loss curve looks like for the spatial discriminator? And Of course, I will check your current updated version as well, thank you again for the great work.

ZHANGZ1YUE avatar Sep 19 '22 06:09 ZHANGZ1YUE

Sorry for the late reply! I've tried to fix this problem recently but the problem still remain unsolved. In my previous version of codes, I set the output of hinge loss function to Variable(), which might be the reason that leads the discriminators' unchanging gradients. In my recent update, I fixed this problem. However, the training results still aren't improved. The discriminators loss always converge to 1 with margin = 1.

hyungting avatar Nov 15 '22 08:11 hyungting