lksshw / SRNet

A pytorch implementation of the SRNet architecture from the paper Editing text in the wild (Liang Wu et al.)
152 stars 35 forks source link

No sigmoid in discriminator output and too much gradient clip #18

Open yichuanliu-lendbuzz opened 3 years ago

yichuanliu-lendbuzz commented 3 years ago

It seems there is no sigmoid activation in the discriminator output before BCE loss. also clamping the graident to -0.01 to 0.01 seems to be too much and training stuck with loss not decreasing. After changing it to -1 to 1, loss started decreasing again

lksshw commented 3 years ago

That's interesting. Please submit a pull request with details of your training process and loss curves

yichuanliu-lendbuzz commented 3 years ago

Don't have time to do this. Also, freezing the BN layer in discriminator seems helped the issue that discriminator loss is not changing at at all. Loss with BN, D loss is not changing at all, seems stuck: image Loss with freezing BN layer in discriminators (I used soft noisy discriminator loss label to stabilize training ): image

harshalchaudhari35 commented 1 year ago

@yichuanliu-lendbuzz hi do you have the piece of code that you changed to freeze these said layers to fix the loss issue? would appreciate any help here, as I'm stuck with the same issue