TensorFlow Keras 実行結果〜テキストの分類〜

イントロダクション

下のページでの学習処理の実行結果を表示します。※わかりづらいので分けました。

_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
embedding (Embedding)        (None, None, 16)          160000    
_________________________________________________________________
global_average_pooling1d (Gl (None, 16)                0         
_________________________________________________________________
dense (Dense)                (None, 16)                272       
_________________________________________________________________
dense_1 (Dense)              (None, 1)                 17        
=================================================================
Total params: 160,289
Trainable params: 160,289
Non-trainable params: 0
_________________________________________________________________
Train on 15000 samples, validate on 10000 samples
Epoch 1/40
15000/15000 [==============================] - 1s 86us/step - loss: 0.6917 - acc: 0.5697 - val_loss: 0.6895 - val_acc: 0.6231
Epoch 2/40
15000/15000 [==============================] - 1s 55us/step - loss: 0.6849 - acc: 0.7046 - val_loss: 0.6800 - val_acc: 0.7423
Epoch 3/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.6701 - acc: 0.7631 - val_loss: 0.6614 - val_acc: 0.7574
Epoch 4/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.6441 - acc: 0.7736 - val_loss: 0.6330 - val_acc: 0.7681
Epoch 5/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.6068 - acc: 0.7985 - val_loss: 0.5935 - val_acc: 0.7907
Epoch 6/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.5607 - acc: 0.8163 - val_loss: 0.5495 - val_acc: 0.8059
Epoch 7/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.5106 - acc: 0.8359 - val_loss: 0.5043 - val_acc: 0.8228
Epoch 8/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.4616 - acc: 0.8520 - val_loss: 0.4619 - val_acc: 0.8381
Epoch 9/40
15000/15000 [==============================] - 1s 53us/step - loss: 0.4173 - acc: 0.8644 - val_loss: 0.4254 - val_acc: 0.8460
Epoch 10/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.3787 - acc: 0.8781 - val_loss: 0.3958 - val_acc: 0.8550
Epoch 11/40
15000/15000 [==============================] - 1s 55us/step - loss: 0.3471 - acc: 0.8847 - val_loss: 0.3745 - val_acc: 0.8595
Epoch 12/40
15000/15000 [==============================] - 1s 55us/step - loss: 0.3215 - acc: 0.8910 - val_loss: 0.3537 - val_acc: 0.8666
Epoch 13/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.2982 - acc: 0.8993 - val_loss: 0.3397 - val_acc: 0.8710
Epoch 14/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.2790 - acc: 0.9049 - val_loss: 0.3273 - val_acc: 0.8743
Epoch 15/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.2625 - acc: 0.9095 - val_loss: 0.3180 - val_acc: 0.8771
Epoch 16/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.2484 - acc: 0.9132 - val_loss: 0.3103 - val_acc: 0.8788
Epoch 17/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.2346 - acc: 0.9191 - val_loss: 0.3041 - val_acc: 0.8797
Epoch 18/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.2227 - acc: 0.9236 - val_loss: 0.2990 - val_acc: 0.8817
Epoch 19/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.2115 - acc: 0.9274 - val_loss: 0.2951 - val_acc: 0.8827
Epoch 20/40
15000/15000 [==============================] - 1s 59us/step - loss: 0.2017 - acc: 0.9315 - val_loss: 0.2917 - val_acc: 0.8839
Epoch 21/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.1922 - acc: 0.9345 - val_loss: 0.2892 - val_acc: 0.8841
Epoch 22/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.1834 - acc: 0.9391 - val_loss: 0.2876 - val_acc: 0.8849
Epoch 23/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.1754 - acc: 0.9426 - val_loss: 0.2868 - val_acc: 0.8851
Epoch 24/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.1674 - acc: 0.9464 - val_loss: 0.2854 - val_acc: 0.8846
Epoch 25/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.1604 - acc: 0.9493 - val_loss: 0.2850 - val_acc: 0.8855
Epoch 26/40
15000/15000 [==============================] - 1s 53us/step - loss: 0.1533 - acc: 0.9521 - val_loss: 0.2855 - val_acc: 0.8868
Epoch 27/40
15000/15000 [==============================] - 1s 53us/step - loss: 0.1474 - acc: 0.9545 - val_loss: 0.2864 - val_acc: 0.8855
Epoch 28/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.1412 - acc: 0.9575 - val_loss: 0.2865 - val_acc: 0.8866
Epoch 29/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.1355 - acc: 0.9583 - val_loss: 0.2874 - val_acc: 0.8874
Epoch 30/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.1305 - acc: 0.9612 - val_loss: 0.2890 - val_acc: 0.8867
Epoch 31/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.1245 - acc: 0.9632 - val_loss: 0.2908 - val_acc: 0.8874
Epoch 32/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.1199 - acc: 0.9657 - val_loss: 0.2930 - val_acc: 0.8852
Epoch 33/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.1145 - acc: 0.9677 - val_loss: 0.2952 - val_acc: 0.8854
Epoch 34/40
15000/15000 [==============================] - 1s 60us/step - loss: 0.1101 - acc: 0.9689 - val_loss: 0.2982 - val_acc: 0.8855
Epoch 35/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.1061 - acc: 0.9708 - val_loss: 0.3001 - val_acc: 0.8851
Epoch 36/40
15000/15000 [==============================] - 1s 56us/step - loss: 0.1013 - acc: 0.9726 - val_loss: 0.3034 - val_acc: 0.8836
Epoch 37/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.0975 - acc: 0.9739 - val_loss: 0.3065 - val_acc: 0.8838
Epoch 38/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.0940 - acc: 0.9739 - val_loss: 0.3103 - val_acc: 0.8830
Epoch 39/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.0898 - acc: 0.9767 - val_loss: 0.3129 - val_acc: 0.8837
Epoch 40/40
15000/15000 [==============================] - 1s 54us/step - loss: 0.0861 - acc: 0.9785 - val_loss: 0.3167 - val_acc: 0.8816
25000/25000 [==============================] - 1s 30us/step
[0.3381449136734009, 0.872]

[0.3381449136734009, 0.872]※「赤字の部分 * 100」=パーセンテージ


関連ページ一覧

  1. Tensorflow Keras 〜初めてのKeras〜
  2. Tensorflow Keras Errors〜”python is not installed as a framework.”〜
  3. Python Tensorflow 〜初めての人工知能(TensorFlowインストール)〜
  4. Tensorflow Keras〜初めのトレーニング_1〜