11

I am building a denoising autoencoder in Keras. The model I'm using is

input_img = Input(shape=(10,))
encoded = GaussianNoise(0.01)(input_img)
encoded = Dropout(0.1)(encoded)
encoded = Dense(20,activation='relu')(encoded)
decoded = Dense(10, activation='sigmoid')(encoded)
ae = Model(input=input_img, output=decoded)

If I subsequently call

ae.fit(x_train, x_train,
                     nb_epoch=3,
                     batch_size=5,
                     shuffle=True,
                     validation_data=(x_test, x_test))

is there a new instance of the noise created for each batch? In other words, for each epoch above are there different instances of the noise for each of the batches? Or is the noise instance fixed to the same thing for all batches and only changes when the epoch changes? Or worse is there only one noise instance selected for the entire thing?

Geordie
  • 111
  • 1
  • 6

1 Answers1

4

A different instance of the noise is created for each batch during training.

JakeBoggs
  • 274
  • 4
  • 17
  • 3
    Welcome to SO. Please read this [how-to-answer](http://stackoverflow.com/help/how-to-answer) and follow the guideline there to provide quality answer. – thewaywewere May 27 '17 at 15:26