我之前遇到过类似的问题,但解决方案非常简单 . 你需要增加时代数 . 这是1000个纪元后的输出
[[ 9.99999881e-01 8.58182432e-08 9.54004670e-12]
[ 8.58779623e-20 9.99999881e-01 6.76907632e-08]
[ 2.12900631e-26 4.09224481e-34 1.00000000e+00]]
这是培训日志..
Epoch 1/1000
3/3 [==============================] - 13s - loss: 2.4340 - acc: 0.3333
Epoch 2/1000
3/3 [==============================] - 0s - loss: 0.1069 - acc: 1.0000
Epoch 3/1000
3/3 [==============================] - 0s - loss: 1.5478e-05 - acc: 1.0000
Epoch 4/1000
3/3 [==============================] - 0s - loss: 2.1458e-06 - acc: 1.0000
Epoch 5/1000
3/3 [==============================] - 0s - loss: 5.9605e-07 - acc: 1.0000
Epoch 6/1000
3/3 [==============================] - 0s - loss: 3.7750e-07 - acc: 1.0000
Epoch 7/1000
3/3 [==============================] - 0s - loss: 2.7816e-07 - acc: 1.0000
Epoch 8/1000
3/3 [==============================] - 0s - loss: 3.7750e-07 - acc: 1.0000
Epoch 9/1000
3/3 [==============================] - 0s - loss: 2.9802e-07 - acc: 1.0000
Epoch 10/1000
...
Epoch 990/1000
3/3 [==============================] - 0s - loss: 1.1921e-07 - acc: 1.0000
Epoch 991/1000
3/3 [==============================] - 0s - loss: 1.1921e-07 - acc: 1.0000
Epoch 992/1000
3/3 [==============================] - 0s - loss: 1.1921e-07 - acc: 1.0000
Epoch 993/1000
3/3 [==============================] - 0s - loss: 1.1921e-07 - acc: 1.0000
Epoch 994/1000
3/3 [==============================] - 0s - loss: 1.1921e-07 - acc: 1.0000
Epoch 995/1000
3/3 [==============================] - 0s - loss: 1.1921e-07 - acc: 1.0000
Epoch 996/1000
3/3 [==============================] - 0s - loss: 1.1921e-07 - acc: 1.0000
Epoch 997/1000
3/3 [==============================] - 0s - loss: 1.1921e-07 - acc: 1.0000
Epoch 998/1000
3/3 [==============================] - 0s - loss: 1.1921e-07 - acc: 1.0000
Epoch 999/1000
3/3 [==============================] - 0s - loss: 1.1921e-07 - acc: 1.0000
Epoch 1000/1000
3/3 [==============================] - 0s - loss: 1.1921e-07 - acc: 1.0000