每个时代的新噪音

时间:2018-02-23 14:24:35

标签: keras noise

我正在keras中构建一个去噪自动编码器,代码如下:

input_signal = Input(shape=(M,))
encoded = Dense(M, activation='relu')(input_signal)
encoded1 = Dense(n_channel, activation='linear')(encoded)
encoded2 = BatchNormalization(axis=-1, momentum=0.99, epsilon=0.001,center=True, scale=True, beta_initializer='zeros', gamma_initializer='ones', moving_mean_initializer='zeros', moving_variance_initializer='ones', beta_regularizer=None, gamma_regularizer=None, beta_constraint=None, gamma_constraint=max_norm(1.4142136))(encoded1)

EbNo_train = 5.01187 #  coverted 7 db of EbNo 5.01187
noise_std = np.sqrt(1/(2*R*EbNo_train))
encoded3 = Lambda(lambda x: x + K.random_normal(shape=K.shape(encoded2),mean=0.0,stddev=noise_std))(encoded2)

decoded = Dense(M, activation='relu')(encoded3)
decoded1 = Dense(M, activation='softmax')(decoded)
autoencoder = Model(input_signal, decoded1)
adam = Adam(lr=0.003)
autoencoder.compile(optimizer=adam, loss='categorical_crossentropy')
autoencoder.fit(data, data,
                epochs=50,
                batch_size=1024)

我希望在高EbNo_train开始训练,然后逐渐降低每个时代的训练。是否有可能在每个时代改变EbNo_train?

0 个答案:

没有答案