LSTM-Sentiment_analysis icon indicating copy to clipboard operation
LSTM-Sentiment_analysis copied to clipboard

为啥跑出来的结果和作者结果图相差这么大?

Open phoenix2014 opened this issue 5 years ago • 0 comments

同样的代码,最后训练 acc: 0.9824, Test score: [0.3315815646162764, 0.0765245167150635, 0.9282939946220496], 与作者 训练 acc:0.9992 ,test score: 0.991 相差很大

Epoch 1/10 13388/13388 [==============================] - 148s 11ms/step - loss: 0.5212 - mean_absolute_error: 0.3465 - acc: 0.7482 Epoch 2/10 13388/13388 [==============================] - 143s 11ms/step - loss: 0.3305 - mean_absolute_error: 0.1988 - acc: 0.8748 Epoch 3/10 13388/13388 [==============================] - 159s 12ms/step - loss: 0.2450 - mean_absolute_error: 0.1415 - acc: 0.9101 Epoch 4/10 13388/13388 [==============================] - 158s 12ms/step - loss: 0.1848 - mean_absolute_error: 0.1050 - acc: 0.9354 Epoch 5/10 13388/13388 [==============================] - 162s 12ms/step - loss: 0.1437 - mean_absolute_error: 0.0809 - acc: 0.9501 Epoch 6/10 13388/13388 [==============================] - 142s 11ms/step - loss: 0.1224 - mean_absolute_error: 0.0672 - acc: 0.9593 Epoch 7/10 13388/13388 [==============================] - 172s 13ms/step - loss: 0.0921 - mean_absolute_error: 0.0517 - acc: 0.9681 Epoch 8/10 13388/13388 [==============================] - 141s 11ms/step - loss: 0.0941 - mean_absolute_error: 0.0518 - acc: 0.9680 Epoch 9/10 13388/13388 [==============================] - 139s 10ms/step - loss: 0.0633 - mean_absolute_error: 0.0343 - acc: 0.9789 Epoch 10/10 13388/13388 [==============================] - 139s 10ms/step - loss: 0.0514 - mean_absolute_error: 0.0282 - acc: 0.9824 Evaluate... 3347/3347 [==============================] - 7s 2ms/step Test score: [0.3315815646162764, 0.0765245167150635, 0.9282939946220496]

phoenix2014 avatar Sep 09 '19 10:09 phoenix2014