我训练了一个LSTM网络,它并没有整体波动,而是在几个地方突飞猛进。我试图调整学习率。还有其他方法可以解决此问题吗?
model.add(LSTM(64, batch_input_shape=(len(TimeStep.fodder), TimeStep.TIME_STEP + 1, 10), return_sequences=True, activation='relu'))
model.add(LSTM(128, activation='relu', return_sequences=True))
model.add(LSTM(64, activation='relu'))
model.add(Dense(2, activation='softmax'))
model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=[categorical_accuracy])
history = model.fit(TimeStep.fodder, TimeStep.target, epochs=500, batch_size=len(TimeStep.fodder))