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

a question about the sigmoid function in the affine coupling layer

Open ShipengFu opened this issue 3 years ago • 2 comments

Hi, thank you for your amazing work. As you mentioned, using the sigmoid function in the affine coupling layer is benefical to the training. I was wondering why you shifted the sigmoid s = F.sigmoid(log_s + 2). Thanks a lot.

ShipengFu avatar Dec 19 '21 07:12 ShipengFu

Shifting will make sigmoid values towards 1, so it is helpful for gradient flow at initializations.

rosinality avatar Dec 20 '21 13:12 rosinality

Shifting will make sigmoid values towards 1, so it is helpful for gradient flow at initializations.

Thank you so much for your reply~

ShipengFu avatar Dec 22 '21 10:12 ShipengFu