You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The activation function of the output layer of the generator is tanh, which returns a value between -1 and 1. To scale that to 0 and 255 (which are the values you expect for an image), we have to multiply it by 127.5 (so that -1 becomes -127.5, and 1 becomes 127.5), and then add 127.5 (so that -127.5 becomes 0, and 127.5 becomes 255). We then have to do the inverse of this when feeding an image into the discriminator (which will expect a value between -1 and 1).
hi,what's the use of 127.5 in this code:
X_train = (X_train.astype(np.float32) - 127.5)/127.5
to scale the input datas? If yes ,than how do you calculate 127.5 , is it just match minist data?
The text was updated successfully, but these errors were encountered: