【问题标题】:Do Keras dropout and GaussianNoise layers apply different instances of noise in every batch?Keras dropout 和 GaussianNoise 层是否在每批中应用不同的噪声实例?
【发布时间】:2016-10-28 21:21:30
【问题描述】:

我正在 Keras 中构建一个去噪自动编码器。我使用的模型是

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)

如果我随后打电话

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

是否为每个批次创建了一个新的噪声实例?换句话说,对于上面的每个时期,每个批次都有不同的噪声实例吗?还是所有批次的噪声实例都固定为同一事物,并且仅在时代变化时才发生变化?或者更糟糕的是,是否只为整个事物选择了一个噪声实例?

【问题讨论】:

标签: noise keras autoencoder


【解决方案1】:

在训练期间为每个批次创建不同的噪声实例。

【讨论】:

  • 欢迎来到 SO。请阅读此how-to-answer 并按照那里的指南提供高质量的答案。
猜你喜欢
  • 2021-04-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-08-09
  • 2020-06-03
  • 1970-01-01
  • 2020-03-13
  • 2019-08-09
相关资源
最近更新 更多