我正在尝试使用自动编码器来压缩时间波。我正在使用下面提到的体系结构。
#input_wave = Input(shape=(7500,))
encoded_1 = Dense(1000, activation='tanh',input_shape=(7500,))
encoded_2 = Dense(500, activation='tanh')
encoded_3 = Dense(300, activation='tanh')
encoded_4 = Dense(128, activation='tanh')
decoded_3 = Dense(300, activation='tanh')
decoded_2 = Dense(500, activation='tanh')
decoded_1 = Dense(1000, activation='tanh')
decoded_0 = Dense(7500, activation='linear')
这是正在使用的损失函数
#autoencoder = Model(input_img, decoded)
autoencoder.compile(optimizer='adadelta', loss='binary_crossentropy')
autoencoder.fit(x_train, x_train,
epochs=15,
batch_size=300,
shuffle=True,
validation_data=(x_test, x_test),
callbacks=[TensorBoard(log_dir='/tmp/autoencoder')])
这就是我的验证分数。 my validation scores
但是当我尝试使用预测和重构波时,它似乎只是一种噪音。 Predicted and real timewave
我在做什么错?任何线索将不胜感激。
更新: 在将损失函数更改为MSE并将优化器更改为adam之后,我看到了网络过度拟合。验证损失永远不会显着下降。请查看随附的屏幕截图。 enter image description here
更新 我将数据长度缩短到2500,并且开始工作。我认为我的模型不够复杂,无法将7500压缩到128,或者根本不可能。因此,我使用3个单独的模型来压缩数据。感谢大家。