培训损失根本没有变化的原因

时间:2018-03-26 14:51:35

标签: tensorflow deep-learning keras

我已经构建了以下模型来执行序列预测,这里是模型

inputs = Input(shape=(64,1))
model = Sequential()
model.add(Conv1D(64,12,activation='relu',input_shape= (64,1),padding='causal'))
model.add(Conv1D(64,12,activation='relu',padding='causal'))
model.add(MaxPooling1D(2))
model.add(Conv1D(128,12,activation='relu',padding='causal'))
model.add(Conv1D(128,12,activation='relu',padding='causal'))
model.add(GlobalAveragePooling1D())
model.add(Dropout((0.5)))
model.add(Dense(dense_expansion,activation='relu'))
model.add(Dense(1,activation='relu'))
model.compile(loss=loss_function, optimizer=optimizer,metrics=['mse','mae'])
model.fit(X_train, Y_train, batch_size=batch_size, validation_data=(X_val,Y_val), epochs=nr_of_epochs,verbose=2) 

模型架构就像这样

enter image description here

然而,训练结果看起来没有变化,可能的原因是什么。训练数据形状(1496000,64,1)和(1496000,1);验证数据为(374000,64,1)和(374000,1)。

enter image description here

0 个答案:

没有答案