zoukankan      html  css  js  c++  java
  • Tensorflow2(预课程)---3.1、Iris分类-层方式

    Tensorflow2(预课程)---3.1、Iris分类-层方式

    一、总结

    一句话总结:

    我们可以很清楚的发现,输入是4维,输出是1维,并且输出是分类问题,分3类(one_hot编码后),所以对应模型可以弄成4->n->3
    # 构建容器
    model = tf.keras.Sequential()
    # 输出层
    model.add(tf.keras.Input(shape=(4,)))
    # 中间层
    model.add(tf.keras.layers.Dense(10,activation='relu'))
    # 输出层
    model.add(tf.keras.layers.Dense(3))
    # 模型的结构
    model.summary()

    1、准确率不够优化方法?

    1、增加训练次数:4-3的结构欠拟合,先训练500次,发现准确率不够,再训练5000次,发现欠拟合
    2、增加网络层数:4-10-3,500次不够,换5000次,准确率为1

    2、pandas打乱数据集?

    (a)、data=data.sample(frac=1.0,random_state=116)#打乱所有数据
    (b)、data=data.reset_index(drop=True) #打乱后的数据index也是乱的,用reset_index重新加一列index,drop=True表示丢弃原有index一列

    3、对于分类问题,将分类转化为数字,然后one_hot编码?

    (A)、转数字:train_y =data.iloc[:120,-1].replace({"Iris-setosa":0,"Iris-versicolor":1,"Iris-virginica":2})
    (B)、one_hot编码:train_y = tf.one_hot(train_y, depth=3)

    4、训练的时候加上准确率以及验证测试集?

    (①)、metrics中加acc:model.compile(optimizer='adam',loss='mse',metrics=['acc'])
    (②)、validation_data中放测试集数据:history = model.fit(train_x,train_y,epochs=5000,validation_data=(test_x,test_y))

    二、Iris分类-层方式

    博客对应课程的视频位置:

    讲课讲法(准确率不够优化方法):

    1、增加训练次数:4-3的结构欠拟合,先训练500次,发现准确率不够,再训练5000次,发现欠拟合
    2、增加网络层数:4-10-3,500次不够,换5000次,准确率为1

    步骤

    1、读取数据集
    2、拆分数据集(拆分成训练数据集和测试数据集)
    3、构建模型
    4、训练模型
    5、检验模型

    需求

    对Iris进行分类
     
    In [1]:
    import pandas as pd
    import numpy as np
    import tensorflow as tf
    import matplotlib.pyplot as plt
    

    1、读取数据集

    In [2]:
    data = pd.read_csv('./iris.data',header=None)
    # data.head() 前5行
    data
    
    Out[2]:
     01234
    0 5.1 3.5 1.4 0.2 Iris-setosa
    1 4.9 3.0 1.4 0.2 Iris-setosa
    2 4.7 3.2 1.3 0.2 Iris-setosa
    3 4.6 3.1 1.5 0.2 Iris-setosa
    4 5.0 3.6 1.4 0.2 Iris-setosa
    ... ... ... ... ... ...
    145 6.7 3.0 5.2 2.3 Iris-virginica
    146 6.3 2.5 5.0 1.9 Iris-virginica
    147 6.5 3.0 5.2 2.0 Iris-virginica
    148 6.2 3.4 5.4 2.3 Iris-virginica
    149 5.9 3.0 5.1 1.8 Iris-virginica

    150 rows × 5 columns

    2、拆分数据集(拆分成训练数据集和测试数据集)

    总共150行数据,前120训练,后30行预测

    我需要打乱顺序

    In [3]:
    data=data.sample(frac=1.0,random_state=116)#打乱所有数据
    data=data.reset_index(drop=True) #打乱后的数据index也是乱的,用reset_index重新加一列index,drop=True表示丢弃原有index一列
    data
    
    Out[3]:
     01234
    0 6.1 2.8 4.0 1.3 Iris-versicolor
    1 6.3 3.3 4.7 1.6 Iris-versicolor
    2 6.8 2.8 4.8 1.4 Iris-versicolor
    3 5.3 3.7 1.5 0.2 Iris-setosa
    4 5.4 3.4 1.7 0.2 Iris-setosa
    ... ... ... ... ... ...
    145 7.4 2.8 6.1 1.9 Iris-virginica
    146 5.1 3.8 1.6 0.2 Iris-setosa
    147 5.0 3.3 1.4 0.2 Iris-setosa
    148 6.7 3.3 5.7 2.1 Iris-virginica
    149 5.5 2.3 4.0 1.3 Iris-versicolor

    150 rows × 5 columns

    In [4]:
    train_x = data.iloc[:120,0:-1]
    test_x = data.iloc[121:,0:-1]
    train_y =data.iloc[:120,-1].replace({"Iris-setosa":0,"Iris-versicolor":1,"Iris-virginica":2})
    test_y =data.iloc[121:,-1].replace({"Iris-setosa":0,"Iris-versicolor":1,"Iris-virginica":2})
    
    In [5]:
    train_y = tf.one_hot(train_y, depth=3)
    test_y = tf.one_hot(test_y, depth=3)
    

    3、构建模型

    4->3 训练500次,测试集准确率只有0.72

    4->10->3 训练500次,测试集准确率只有0.5172 这是因为训练次数太少了

    4->3 训练5000次,测试集准确率也只有0.8左右

    4->10->3 训练5000次,acc是1了

    In [6]:
    # 构建容器
    model = tf.keras.Sequential()
    # 输出层
    model.add(tf.keras.Input(shape=(4,)))
    # 中间层
    model.add(tf.keras.layers.Dense(10,activation='relu'))
    # 输出层
    model.add(tf.keras.layers.Dense(3))
    # 模型的结构
    model.summary()
    
    Model: "sequential"
    _________________________________________________________________
    Layer (type)                 Output Shape              Param #   
    =================================================================
    dense (Dense)                (None, 10)                50        
    _________________________________________________________________
    dense_1 (Dense)              (None, 3)                 33        
    =================================================================
    Total params: 83
    Trainable params: 83
    Non-trainable params: 0
    _________________________________________________________________
    

    4、训练模型

    In [7]:
    # 配置优化函数和损失器
    model.compile(optimizer='adam',loss='mse',metrics=['acc'])
    # 开始训练
    history = model.fit(train_x,train_y,epochs=5000,validation_data=(test_x,test_y))
    
    Epoch 1/5000
    4/4 [==============================] - 0s 34ms/step - loss: 7.6696 - acc: 0.3167 - val_loss: 5.7491 - val_acc: 0.4483
    Epoch 2/5000
    4/4 [==============================] - 0s 7ms/step - loss: 7.0254 - acc: 0.3167 - val_loss: 5.2289 - val_acc: 0.4483
    Epoch 3/5000
    4/4 [==============================] - 0s 10ms/step - loss: 6.3978 - acc: 0.3167 - val_loss: 4.7433 - val_acc: 0.4483
    Epoch 4/5000
    4/4 [==============================] - 0s 6ms/step - loss: 5.8265 - acc: 0.3167 - val_loss: 4.2884 - val_acc: 0.4483
    Epoch 5/5000
    4/4 [==============================] - 0s 6ms/step - loss: 5.3004 - acc: 0.3167 - val_loss: 3.8649 - val_acc: 0.4483
    Epoch 6/5000
    4/4 [==============================] - 0s 7ms/step - loss: 4.7814 - acc: 0.3333 - val_loss: 3.4773 - val_acc: 0.4483
    Epoch 7/5000
    4/4 [==============================] - 0s 6ms/step - loss: 4.3135 - acc: 0.3500 - val_loss: 3.1206 - val_acc: 0.4828
    Epoch 8/5000
    4/4 [==============================] - 0s 6ms/step - loss: 3.8878 - acc: 0.3667 - val_loss: 2.7925 - val_acc: 0.4828
    Epoch 9/5000
    4/4 [==============================] - 0s 6ms/step - loss: 3.4932 - acc: 0.4000 - val_loss: 2.4929 - val_acc: 0.5172
    Epoch 10/5000
    4/4 [==============================] - 0s 7ms/step - loss: 3.1345 - acc: 0.4417 - val_loss: 2.2200 - val_acc: 0.5862
    Epoch 11/5000
    4/4 [==============================] - 0s 7ms/step - loss: 2.8036 - acc: 0.4750 - val_loss: 1.9736 - val_acc: 0.6552
    Epoch 12/5000
    4/4 [==============================] - 0s 6ms/step - loss: 2.5092 - acc: 0.5167 - val_loss: 1.7506 - val_acc: 0.6897
    Epoch 13/5000
    4/4 [==============================] - 0s 7ms/step - loss: 2.2304 - acc: 0.5250 - val_loss: 1.5520 - val_acc: 0.6897
    Epoch 14/5000
    4/4 [==============================] - 0s 7ms/step - loss: 1.9880 - acc: 0.5500 - val_loss: 1.3734 - val_acc: 0.7586
    Epoch 15/5000
    4/4 [==============================] - 0s 7ms/step - loss: 1.7718 - acc: 0.5583 - val_loss: 1.2142 - val_acc: 0.7586
    Epoch 16/5000
    4/4 [==============================] - 0s 8ms/step - loss: 1.5773 - acc: 0.5667 - val_loss: 1.0727 - val_acc: 0.7586
    Epoch 17/5000
    4/4 [==============================] - 0s 8ms/step - loss: 1.4066 - acc: 0.5750 - val_loss: 0.9464 - val_acc: 0.7586
    Epoch 18/5000
    4/4 [==============================] - 0s 6ms/step - loss: 1.2499 - acc: 0.5750 - val_loss: 0.8361 - val_acc: 0.7586
    Epoch 19/5000
    4/4 [==============================] - 0s 6ms/step - loss: 1.1126 - acc: 0.5750 - val_loss: 0.7389 - val_acc: 0.7586
    Epoch 20/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.9895 - acc: 0.5750 - val_loss: 0.6538 - val_acc: 0.7931
    Epoch 21/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.8758 - acc: 0.5667 - val_loss: 0.5802 - val_acc: 0.7241
    Epoch 22/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.7821 - acc: 0.5583 - val_loss: 0.5153 - val_acc: 0.6897
    Epoch 23/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.6949 - acc: 0.5500 - val_loss: 0.4587 - val_acc: 0.6552
    Epoch 24/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.6200 - acc: 0.5500 - val_loss: 0.4098 - val_acc: 0.6552
    Epoch 25/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.5531 - acc: 0.5500 - val_loss: 0.3676 - val_acc: 0.6207
    Epoch 26/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.4958 - acc: 0.5417 - val_loss: 0.3312 - val_acc: 0.5862
    Epoch 27/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.4442 - acc: 0.5333 - val_loss: 0.2997 - val_acc: 0.6207
    Epoch 28/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.3996 - acc: 0.5167 - val_loss: 0.2731 - val_acc: 0.6207
    Epoch 29/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.3605 - acc: 0.5333 - val_loss: 0.2500 - val_acc: 0.6552
    Epoch 30/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.3261 - acc: 0.5333 - val_loss: 0.2310 - val_acc: 0.6552
    Epoch 31/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.2977 - acc: 0.5333 - val_loss: 0.2155 - val_acc: 0.6552
    Epoch 32/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.2730 - acc: 0.5333 - val_loss: 0.2030 - val_acc: 0.6552
    Epoch 33/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.2511 - acc: 0.5250 - val_loss: 0.1926 - val_acc: 0.6552
    Epoch 34/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.2329 - acc: 0.5250 - val_loss: 0.1846 - val_acc: 0.6207
    Epoch 35/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.2167 - acc: 0.5333 - val_loss: 0.1776 - val_acc: 0.6552
    Epoch 36/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.2039 - acc: 0.5250 - val_loss: 0.1725 - val_acc: 0.5862
    Epoch 37/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1914 - acc: 0.5333 - val_loss: 0.1673 - val_acc: 0.6552
    Epoch 38/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1817 - acc: 0.5333 - val_loss: 0.1638 - val_acc: 0.6207
    Epoch 39/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1734 - acc: 0.5583 - val_loss: 0.1607 - val_acc: 0.6207
    Epoch 40/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1670 - acc: 0.5917 - val_loss: 0.1589 - val_acc: 0.6552
    Epoch 41/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.1610 - acc: 0.6250 - val_loss: 0.1571 - val_acc: 0.6897
    Epoch 42/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.1557 - acc: 0.6333 - val_loss: 0.1552 - val_acc: 0.6897
    Epoch 43/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1513 - acc: 0.6583 - val_loss: 0.1536 - val_acc: 0.6552
    Epoch 44/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1477 - acc: 0.6750 - val_loss: 0.1524 - val_acc: 0.6552
    Epoch 45/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1445 - acc: 0.7000 - val_loss: 0.1515 - val_acc: 0.6552
    Epoch 46/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1415 - acc: 0.7333 - val_loss: 0.1505 - val_acc: 0.6552
    Epoch 47/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1392 - acc: 0.7333 - val_loss: 0.1500 - val_acc: 0.6897
    Epoch 48/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1372 - acc: 0.7417 - val_loss: 0.1495 - val_acc: 0.6897
    Epoch 49/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1351 - acc: 0.7500 - val_loss: 0.1483 - val_acc: 0.6897
    Epoch 50/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1333 - acc: 0.7667 - val_loss: 0.1474 - val_acc: 0.6897
    Epoch 51/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1318 - acc: 0.7667 - val_loss: 0.1469 - val_acc: 0.6897
    Epoch 52/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1305 - acc: 0.7667 - val_loss: 0.1461 - val_acc: 0.6897
    Epoch 53/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1291 - acc: 0.7750 - val_loss: 0.1448 - val_acc: 0.6897
    Epoch 54/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1280 - acc: 0.7750 - val_loss: 0.1445 - val_acc: 0.6897
    Epoch 55/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1268 - acc: 0.7750 - val_loss: 0.1431 - val_acc: 0.6897
    Epoch 56/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1258 - acc: 0.7750 - val_loss: 0.1426 - val_acc: 0.6552
    Epoch 57/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.1248 - acc: 0.7750 - val_loss: 0.1418 - val_acc: 0.6552
    Epoch 58/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1240 - acc: 0.7750 - val_loss: 0.1413 - val_acc: 0.6552
    Epoch 59/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1230 - acc: 0.7667 - val_loss: 0.1400 - val_acc: 0.6552
    Epoch 60/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1223 - acc: 0.7750 - val_loss: 0.1386 - val_acc: 0.6552
    Epoch 61/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1215 - acc: 0.7750 - val_loss: 0.1377 - val_acc: 0.6552
    Epoch 62/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1208 - acc: 0.7750 - val_loss: 0.1368 - val_acc: 0.6552
    Epoch 63/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1201 - acc: 0.7750 - val_loss: 0.1365 - val_acc: 0.6552
    Epoch 64/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1195 - acc: 0.7750 - val_loss: 0.1355 - val_acc: 0.6552
    Epoch 65/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1188 - acc: 0.7750 - val_loss: 0.1355 - val_acc: 0.6552
    Epoch 66/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1183 - acc: 0.7750 - val_loss: 0.1344 - val_acc: 0.6552
    Epoch 67/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.1175 - acc: 0.7750 - val_loss: 0.1342 - val_acc: 0.6552
    Epoch 68/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1169 - acc: 0.7750 - val_loss: 0.1339 - val_acc: 0.6552
    Epoch 69/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1165 - acc: 0.7667 - val_loss: 0.1334 - val_acc: 0.6552
    Epoch 70/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1159 - acc: 0.7667 - val_loss: 0.1327 - val_acc: 0.6552
    Epoch 71/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1154 - acc: 0.7667 - val_loss: 0.1317 - val_acc: 0.6552
    Epoch 72/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1151 - acc: 0.7833 - val_loss: 0.1296 - val_acc: 0.7241
    Epoch 73/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1144 - acc: 0.8000 - val_loss: 0.1292 - val_acc: 0.7241
    Epoch 74/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1140 - acc: 0.8000 - val_loss: 0.1294 - val_acc: 0.6897
    Epoch 75/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1135 - acc: 0.8000 - val_loss: 0.1290 - val_acc: 0.6897
    Epoch 76/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1130 - acc: 0.8000 - val_loss: 0.1288 - val_acc: 0.6897
    Epoch 77/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1126 - acc: 0.8000 - val_loss: 0.1278 - val_acc: 0.7241
    Epoch 78/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1122 - acc: 0.8083 - val_loss: 0.1268 - val_acc: 0.7241
    Epoch 79/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1118 - acc: 0.8083 - val_loss: 0.1269 - val_acc: 0.7241
    Epoch 80/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1113 - acc: 0.8083 - val_loss: 0.1264 - val_acc: 0.7241
    Epoch 81/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1109 - acc: 0.8083 - val_loss: 0.1258 - val_acc: 0.7241
    Epoch 82/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1105 - acc: 0.8167 - val_loss: 0.1249 - val_acc: 0.7241
    Epoch 83/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.1101 - acc: 0.8167 - val_loss: 0.1247 - val_acc: 0.7241
    Epoch 84/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1097 - acc: 0.8167 - val_loss: 0.1248 - val_acc: 0.7241
    Epoch 85/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1093 - acc: 0.8167 - val_loss: 0.1240 - val_acc: 0.7241
    Epoch 86/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1089 - acc: 0.8167 - val_loss: 0.1240 - val_acc: 0.7241
    Epoch 87/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1086 - acc: 0.8167 - val_loss: 0.1231 - val_acc: 0.7241
    Epoch 88/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1082 - acc: 0.8167 - val_loss: 0.1234 - val_acc: 0.7241
    Epoch 89/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1078 - acc: 0.8167 - val_loss: 0.1229 - val_acc: 0.7241
    Epoch 90/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.1074 - acc: 0.8167 - val_loss: 0.1224 - val_acc: 0.7241
    Epoch 91/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.1071 - acc: 0.8167 - val_loss: 0.1219 - val_acc: 0.7241
    Epoch 92/5000
    4/4 [==============================] - 0s 9ms/step - loss: 0.1068 - acc: 0.8167 - val_loss: 0.1214 - val_acc: 0.7241
    Epoch 93/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1064 - acc: 0.8167 - val_loss: 0.1199 - val_acc: 0.7241
    Epoch 94/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1061 - acc: 0.8333 - val_loss: 0.1189 - val_acc: 0.7241
    Epoch 95/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1058 - acc: 0.8333 - val_loss: 0.1187 - val_acc: 0.7241
    Epoch 96/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1054 - acc: 0.8333 - val_loss: 0.1189 - val_acc: 0.7241
    Epoch 97/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1051 - acc: 0.8333 - val_loss: 0.1191 - val_acc: 0.7241
    Epoch 98/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1049 - acc: 0.8333 - val_loss: 0.1204 - val_acc: 0.7241
    Epoch 99/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1045 - acc: 0.8250 - val_loss: 0.1198 - val_acc: 0.7241
    Epoch 100/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1041 - acc: 0.8250 - val_loss: 0.1196 - val_acc: 0.7241
    Epoch 101/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.1038 - acc: 0.8250 - val_loss: 0.1184 - val_acc: 0.7241
    Epoch 102/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1035 - acc: 0.8417 - val_loss: 0.1175 - val_acc: 0.7241
    Epoch 103/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1033 - acc: 0.8500 - val_loss: 0.1177 - val_acc: 0.7241
    Epoch 104/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1028 - acc: 0.8333 - val_loss: 0.1175 - val_acc: 0.7241
    Epoch 105/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1026 - acc: 0.8500 - val_loss: 0.1165 - val_acc: 0.7241
    Epoch 106/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1024 - acc: 0.8417 - val_loss: 0.1168 - val_acc: 0.7241
    Epoch 107/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1021 - acc: 0.8583 - val_loss: 0.1151 - val_acc: 0.7241
    Epoch 108/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1017 - acc: 0.8583 - val_loss: 0.1151 - val_acc: 0.7241
    Epoch 109/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1014 - acc: 0.8667 - val_loss: 0.1151 - val_acc: 0.7241
    Epoch 110/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1011 - acc: 0.8667 - val_loss: 0.1150 - val_acc: 0.7241
    Epoch 111/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1009 - acc: 0.8583 - val_loss: 0.1162 - val_acc: 0.7241
    Epoch 112/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.1006 - acc: 0.8417 - val_loss: 0.1165 - val_acc: 0.7241
    Epoch 113/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1005 - acc: 0.8417 - val_loss: 0.1165 - val_acc: 0.7241
    Epoch 114/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.1001 - acc: 0.8417 - val_loss: 0.1146 - val_acc: 0.7241
    Epoch 115/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0998 - acc: 0.8667 - val_loss: 0.1132 - val_acc: 0.7586
    Epoch 116/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0996 - acc: 0.8667 - val_loss: 0.1126 - val_acc: 0.7586
    Epoch 117/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0992 - acc: 0.8667 - val_loss: 0.1123 - val_acc: 0.7586
    Epoch 118/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0991 - acc: 0.8667 - val_loss: 0.1120 - val_acc: 0.7586
    Epoch 119/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0987 - acc: 0.8667 - val_loss: 0.1131 - val_acc: 0.7586
    Epoch 120/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0986 - acc: 0.8667 - val_loss: 0.1125 - val_acc: 0.7586
    Epoch 121/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0983 - acc: 0.8667 - val_loss: 0.1133 - val_acc: 0.7586
    Epoch 122/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0980 - acc: 0.8667 - val_loss: 0.1133 - val_acc: 0.7586
    Epoch 123/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0978 - acc: 0.8667 - val_loss: 0.1131 - val_acc: 0.7586
    Epoch 124/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0977 - acc: 0.8583 - val_loss: 0.1138 - val_acc: 0.7241
    Epoch 125/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0973 - acc: 0.8583 - val_loss: 0.1129 - val_acc: 0.7586
    Epoch 126/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0971 - acc: 0.8583 - val_loss: 0.1110 - val_acc: 0.7586
    Epoch 127/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0968 - acc: 0.8667 - val_loss: 0.1102 - val_acc: 0.7586
    Epoch 128/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0966 - acc: 0.8750 - val_loss: 0.1095 - val_acc: 0.7586
    Epoch 129/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0963 - acc: 0.8667 - val_loss: 0.1105 - val_acc: 0.7586
    Epoch 130/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0961 - acc: 0.8667 - val_loss: 0.1105 - val_acc: 0.7586
    Epoch 131/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0959 - acc: 0.8667 - val_loss: 0.1109 - val_acc: 0.7586
    Epoch 132/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0957 - acc: 0.8667 - val_loss: 0.1107 - val_acc: 0.7586
    Epoch 133/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0955 - acc: 0.8667 - val_loss: 0.1096 - val_acc: 0.7586
    Epoch 134/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0952 - acc: 0.8667 - val_loss: 0.1095 - val_acc: 0.7586
    Epoch 135/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0950 - acc: 0.8667 - val_loss: 0.1090 - val_acc: 0.7586
    Epoch 136/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0948 - acc: 0.8667 - val_loss: 0.1086 - val_acc: 0.7586
    Epoch 137/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0945 - acc: 0.8833 - val_loss: 0.1074 - val_acc: 0.7586
    Epoch 138/5000
    4/4 [==============================] - 0s 9ms/step - loss: 0.0943 - acc: 0.8833 - val_loss: 0.1066 - val_acc: 0.7586
    Epoch 139/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0941 - acc: 0.8833 - val_loss: 0.1067 - val_acc: 0.7586
    Epoch 140/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0940 - acc: 0.8833 - val_loss: 0.1061 - val_acc: 0.7586
    Epoch 141/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0938 - acc: 0.8833 - val_loss: 0.1068 - val_acc: 0.7586
    Epoch 142/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0935 - acc: 0.8833 - val_loss: 0.1061 - val_acc: 0.7586
    Epoch 143/5000
    4/4 [==============================] - 0s 9ms/step - loss: 0.0932 - acc: 0.8833 - val_loss: 0.1064 - val_acc: 0.7586
    Epoch 144/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0930 - acc: 0.8833 - val_loss: 0.1064 - val_acc: 0.7586
    Epoch 145/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0928 - acc: 0.8833 - val_loss: 0.1063 - val_acc: 0.7586
    Epoch 146/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0926 - acc: 0.8833 - val_loss: 0.1068 - val_acc: 0.7586
    Epoch 147/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0925 - acc: 0.8750 - val_loss: 0.1066 - val_acc: 0.7586
    Epoch 148/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0922 - acc: 0.8833 - val_loss: 0.1061 - val_acc: 0.7586
    Epoch 149/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0920 - acc: 0.8833 - val_loss: 0.1058 - val_acc: 0.7586
    Epoch 150/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0918 - acc: 0.8833 - val_loss: 0.1056 - val_acc: 0.7586
    Epoch 151/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0916 - acc: 0.8833 - val_loss: 0.1045 - val_acc: 0.7586
    Epoch 152/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0914 - acc: 0.8833 - val_loss: 0.1038 - val_acc: 0.7586
    Epoch 153/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0912 - acc: 0.8833 - val_loss: 0.1046 - val_acc: 0.7586
    Epoch 154/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0910 - acc: 0.8833 - val_loss: 0.1037 - val_acc: 0.7586
    Epoch 155/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0909 - acc: 0.8833 - val_loss: 0.1048 - val_acc: 0.7586
    Epoch 156/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0905 - acc: 0.8833 - val_loss: 0.1049 - val_acc: 0.7586
    Epoch 157/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0905 - acc: 0.8833 - val_loss: 0.1029 - val_acc: 0.7586
    Epoch 158/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0901 - acc: 0.8833 - val_loss: 0.1023 - val_acc: 0.7586
    Epoch 159/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0899 - acc: 0.8833 - val_loss: 0.1029 - val_acc: 0.7586
    Epoch 160/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0896 - acc: 0.8833 - val_loss: 0.1025 - val_acc: 0.7586
    Epoch 161/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0894 - acc: 0.8833 - val_loss: 0.1019 - val_acc: 0.7586
    Epoch 162/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0893 - acc: 0.8833 - val_loss: 0.1022 - val_acc: 0.7586
    Epoch 163/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0890 - acc: 0.8833 - val_loss: 0.1019 - val_acc: 0.7586
    Epoch 164/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0888 - acc: 0.8833 - val_loss: 0.1008 - val_acc: 0.7586
    Epoch 165/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0887 - acc: 0.8833 - val_loss: 0.1014 - val_acc: 0.7586
    Epoch 166/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0884 - acc: 0.8833 - val_loss: 0.1008 - val_acc: 0.7586
    Epoch 167/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0881 - acc: 0.8833 - val_loss: 0.1006 - val_acc: 0.7586
    Epoch 168/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0879 - acc: 0.8833 - val_loss: 0.0996 - val_acc: 0.7586
    Epoch 169/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0878 - acc: 0.8833 - val_loss: 0.0994 - val_acc: 0.7586
    Epoch 170/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0875 - acc: 0.8833 - val_loss: 0.0987 - val_acc: 0.7586
    Epoch 171/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0873 - acc: 0.8833 - val_loss: 0.0981 - val_acc: 0.7586
    Epoch 172/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0871 - acc: 0.8833 - val_loss: 0.0977 - val_acc: 0.7586
    Epoch 173/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0869 - acc: 0.8833 - val_loss: 0.0985 - val_acc: 0.7586
    Epoch 174/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0866 - acc: 0.8833 - val_loss: 0.0988 - val_acc: 0.7586
    Epoch 175/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0865 - acc: 0.8833 - val_loss: 0.0984 - val_acc: 0.7586
    Epoch 176/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0863 - acc: 0.8833 - val_loss: 0.0981 - val_acc: 0.7586
    Epoch 177/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0862 - acc: 0.8833 - val_loss: 0.0989 - val_acc: 0.7586
    Epoch 178/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0858 - acc: 0.8833 - val_loss: 0.0984 - val_acc: 0.7586
    Epoch 179/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0856 - acc: 0.8833 - val_loss: 0.0975 - val_acc: 0.7586
    Epoch 180/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0855 - acc: 0.8833 - val_loss: 0.0959 - val_acc: 0.8276
    Epoch 181/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0853 - acc: 0.9000 - val_loss: 0.0952 - val_acc: 0.8276
    Epoch 182/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0852 - acc: 0.8917 - val_loss: 0.0958 - val_acc: 0.8276
    Epoch 183/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0849 - acc: 0.8917 - val_loss: 0.0948 - val_acc: 0.8276
    Epoch 184/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0846 - acc: 0.8917 - val_loss: 0.0957 - val_acc: 0.7931
    Epoch 185/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0844 - acc: 0.8833 - val_loss: 0.0961 - val_acc: 0.7586
    Epoch 186/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0841 - acc: 0.8833 - val_loss: 0.0960 - val_acc: 0.7586
    Epoch 187/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0840 - acc: 0.8833 - val_loss: 0.0950 - val_acc: 0.8276
    Epoch 188/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0838 - acc: 0.8917 - val_loss: 0.0950 - val_acc: 0.8276
    Epoch 189/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0836 - acc: 0.8917 - val_loss: 0.0949 - val_acc: 0.8276
    Epoch 190/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0833 - acc: 0.8917 - val_loss: 0.0944 - val_acc: 0.8276
    Epoch 191/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0831 - acc: 0.8917 - val_loss: 0.0939 - val_acc: 0.8276
    Epoch 192/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0830 - acc: 0.8917 - val_loss: 0.0934 - val_acc: 0.8276
    Epoch 193/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0827 - acc: 0.9000 - val_loss: 0.0938 - val_acc: 0.8276
    Epoch 194/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0828 - acc: 0.8917 - val_loss: 0.0948 - val_acc: 0.7586
    Epoch 195/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0824 - acc: 0.8833 - val_loss: 0.0943 - val_acc: 0.7931
    Epoch 196/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0821 - acc: 0.8917 - val_loss: 0.0928 - val_acc: 0.8621
    Epoch 197/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0820 - acc: 0.9083 - val_loss: 0.0918 - val_acc: 0.8621
    Epoch 198/5000
    4/4 [==============================] - ETA: 0s - loss: 0.0830 - acc: 0.906 - 0s 9ms/step - loss: 0.0819 - acc: 0.9083 - val_loss: 0.0912 - val_acc: 0.8621
    Epoch 199/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0816 - acc: 0.9083 - val_loss: 0.0910 - val_acc: 0.8621
    Epoch 200/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0813 - acc: 0.9083 - val_loss: 0.0919 - val_acc: 0.8621
    Epoch 201/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0811 - acc: 0.9000 - val_loss: 0.0929 - val_acc: 0.8276
    Epoch 202/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0810 - acc: 0.8917 - val_loss: 0.0932 - val_acc: 0.8276
    Epoch 203/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0808 - acc: 0.9000 - val_loss: 0.0922 - val_acc: 0.8621
    Epoch 204/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0805 - acc: 0.9000 - val_loss: 0.0916 - val_acc: 0.8621
    Epoch 205/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0803 - acc: 0.9000 - val_loss: 0.0909 - val_acc: 0.8621
    Epoch 206/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0801 - acc: 0.9000 - val_loss: 0.0902 - val_acc: 0.8621
    Epoch 207/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0799 - acc: 0.9083 - val_loss: 0.0895 - val_acc: 0.8621
    Epoch 208/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0797 - acc: 0.9083 - val_loss: 0.0892 - val_acc: 0.8621
    Epoch 209/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0795 - acc: 0.9083 - val_loss: 0.0887 - val_acc: 0.8621
    Epoch 210/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0793 - acc: 0.9083 - val_loss: 0.0885 - val_acc: 0.8621
    Epoch 211/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0791 - acc: 0.9083 - val_loss: 0.0891 - val_acc: 0.8621
    Epoch 212/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0789 - acc: 0.9083 - val_loss: 0.0888 - val_acc: 0.8621
    Epoch 213/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0789 - acc: 0.9000 - val_loss: 0.0898 - val_acc: 0.8621
    Epoch 214/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0786 - acc: 0.9000 - val_loss: 0.0902 - val_acc: 0.8621
    Epoch 215/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0783 - acc: 0.9000 - val_loss: 0.0899 - val_acc: 0.8621
    Epoch 216/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0785 - acc: 0.9000 - val_loss: 0.0877 - val_acc: 0.8621
    Epoch 217/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0779 - acc: 0.9083 - val_loss: 0.0872 - val_acc: 0.8621
    Epoch 218/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0779 - acc: 0.9000 - val_loss: 0.0881 - val_acc: 0.8621
    Epoch 219/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0775 - acc: 0.9000 - val_loss: 0.0879 - val_acc: 0.8621
    Epoch 220/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0773 - acc: 0.9083 - val_loss: 0.0871 - val_acc: 0.8621
    Epoch 221/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0771 - acc: 0.9083 - val_loss: 0.0874 - val_acc: 0.8621
    Epoch 222/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0770 - acc: 0.9083 - val_loss: 0.0867 - val_acc: 0.8621
    Epoch 223/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0767 - acc: 0.9083 - val_loss: 0.0869 - val_acc: 0.8621
    Epoch 224/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0765 - acc: 0.9083 - val_loss: 0.0872 - val_acc: 0.8621
    Epoch 225/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0763 - acc: 0.9000 - val_loss: 0.0869 - val_acc: 0.8621
    Epoch 226/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0761 - acc: 0.9083 - val_loss: 0.0863 - val_acc: 0.8621
    Epoch 227/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0759 - acc: 0.9167 - val_loss: 0.0859 - val_acc: 0.8621
    Epoch 228/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0757 - acc: 0.9167 - val_loss: 0.0855 - val_acc: 0.8621
    Epoch 229/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0755 - acc: 0.9167 - val_loss: 0.0852 - val_acc: 0.8966
    Epoch 230/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0753 - acc: 0.9167 - val_loss: 0.0852 - val_acc: 0.8621
    Epoch 231/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0751 - acc: 0.9167 - val_loss: 0.0847 - val_acc: 0.8966
    Epoch 232/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0750 - acc: 0.9167 - val_loss: 0.0840 - val_acc: 0.8966
    Epoch 233/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0747 - acc: 0.9167 - val_loss: 0.0842 - val_acc: 0.8966
    Epoch 234/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0746 - acc: 0.9167 - val_loss: 0.0844 - val_acc: 0.8966
    Epoch 235/5000
    4/4 [==============================] - 0s 10ms/step - loss: 0.0743 - acc: 0.9167 - val_loss: 0.0840 - val_acc: 0.8966
    Epoch 236/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0743 - acc: 0.9167 - val_loss: 0.0827 - val_acc: 0.9310
    Epoch 237/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0740 - acc: 0.9250 - val_loss: 0.0828 - val_acc: 0.9310
    Epoch 238/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0738 - acc: 0.9250 - val_loss: 0.0828 - val_acc: 0.9310
    Epoch 239/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0736 - acc: 0.9167 - val_loss: 0.0827 - val_acc: 0.9310
    Epoch 240/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0734 - acc: 0.9250 - val_loss: 0.0824 - val_acc: 0.9310
    Epoch 241/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0733 - acc: 0.9250 - val_loss: 0.0823 - val_acc: 0.9310
    Epoch 242/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0730 - acc: 0.9250 - val_loss: 0.0820 - val_acc: 0.9310
    Epoch 243/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0729 - acc: 0.9167 - val_loss: 0.0823 - val_acc: 0.9310
    Epoch 244/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0726 - acc: 0.9167 - val_loss: 0.0821 - val_acc: 0.9310
    Epoch 245/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0726 - acc: 0.9333 - val_loss: 0.0805 - val_acc: 0.9310
    Epoch 246/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0724 - acc: 0.9250 - val_loss: 0.0809 - val_acc: 0.9310
    Epoch 247/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0720 - acc: 0.9250 - val_loss: 0.0806 - val_acc: 0.9310
    Epoch 248/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0718 - acc: 0.9250 - val_loss: 0.0805 - val_acc: 0.9310
    Epoch 249/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0717 - acc: 0.9250 - val_loss: 0.0804 - val_acc: 0.9310
    Epoch 250/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0715 - acc: 0.9250 - val_loss: 0.0802 - val_acc: 0.9310
    Epoch 251/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0713 - acc: 0.9333 - val_loss: 0.0798 - val_acc: 0.9310
    Epoch 252/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0711 - acc: 0.9250 - val_loss: 0.0801 - val_acc: 0.9310
    Epoch 253/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0710 - acc: 0.9250 - val_loss: 0.0801 - val_acc: 0.9310
    Epoch 254/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0708 - acc: 0.9333 - val_loss: 0.0790 - val_acc: 0.9310
    Epoch 255/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0706 - acc: 0.9417 - val_loss: 0.0790 - val_acc: 0.9310
    Epoch 256/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0706 - acc: 0.9417 - val_loss: 0.0777 - val_acc: 0.9310
    Epoch 257/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0702 - acc: 0.9417 - val_loss: 0.0781 - val_acc: 0.9310
    Epoch 258/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0700 - acc: 0.9417 - val_loss: 0.0782 - val_acc: 0.9310
    Epoch 259/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0702 - acc: 0.9417 - val_loss: 0.0774 - val_acc: 0.9310
    Epoch 260/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0698 - acc: 0.9333 - val_loss: 0.0787 - val_acc: 0.9310
    Epoch 261/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0695 - acc: 0.9333 - val_loss: 0.0779 - val_acc: 0.9310
    Epoch 262/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0692 - acc: 0.9417 - val_loss: 0.0775 - val_acc: 0.9310
    Epoch 263/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0691 - acc: 0.9417 - val_loss: 0.0773 - val_acc: 0.9310
    Epoch 264/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0689 - acc: 0.9417 - val_loss: 0.0766 - val_acc: 0.9310
    Epoch 265/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0687 - acc: 0.9417 - val_loss: 0.0764 - val_acc: 0.9310
    Epoch 266/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0685 - acc: 0.9417 - val_loss: 0.0763 - val_acc: 0.9310
    Epoch 267/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0683 - acc: 0.9417 - val_loss: 0.0761 - val_acc: 0.9310
    Epoch 268/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0681 - acc: 0.9417 - val_loss: 0.0762 - val_acc: 0.9310
    Epoch 269/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0680 - acc: 0.9417 - val_loss: 0.0764 - val_acc: 0.9310
    Epoch 270/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0678 - acc: 0.9417 - val_loss: 0.0756 - val_acc: 0.9310
    Epoch 271/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0676 - acc: 0.9417 - val_loss: 0.0756 - val_acc: 0.9310
    Epoch 272/5000
    4/4 [==============================] - 0s 9ms/step - loss: 0.0674 - acc: 0.9417 - val_loss: 0.0754 - val_acc: 0.9310
    Epoch 273/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0673 - acc: 0.9417 - val_loss: 0.0748 - val_acc: 0.9310
    Epoch 274/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0671 - acc: 0.9417 - val_loss: 0.0744 - val_acc: 0.9310
    Epoch 275/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0669 - acc: 0.9417 - val_loss: 0.0743 - val_acc: 0.9310
    Epoch 276/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0668 - acc: 0.9500 - val_loss: 0.0736 - val_acc: 0.9310
    Epoch 277/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0666 - acc: 0.9500 - val_loss: 0.0742 - val_acc: 0.9310
    Epoch 278/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0665 - acc: 0.9417 - val_loss: 0.0750 - val_acc: 0.9310
    Epoch 279/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0662 - acc: 0.9417 - val_loss: 0.0743 - val_acc: 0.9310
    Epoch 280/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0661 - acc: 0.9417 - val_loss: 0.0734 - val_acc: 0.9310
    Epoch 281/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0659 - acc: 0.9417 - val_loss: 0.0730 - val_acc: 0.9310
    Epoch 282/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0658 - acc: 0.9417 - val_loss: 0.0732 - val_acc: 0.9310
    Epoch 283/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0656 - acc: 0.9500 - val_loss: 0.0724 - val_acc: 0.9310
    Epoch 284/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0655 - acc: 0.9500 - val_loss: 0.0722 - val_acc: 0.9310
    Epoch 285/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0653 - acc: 0.9500 - val_loss: 0.0720 - val_acc: 0.9310
    Epoch 286/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0651 - acc: 0.9500 - val_loss: 0.0721 - val_acc: 0.9310
    Epoch 287/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0649 - acc: 0.9500 - val_loss: 0.0724 - val_acc: 0.9310
    Epoch 288/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0648 - acc: 0.9417 - val_loss: 0.0724 - val_acc: 0.9310
    Epoch 289/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0647 - acc: 0.9417 - val_loss: 0.0725 - val_acc: 0.9310
    Epoch 290/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0645 - acc: 0.9417 - val_loss: 0.0714 - val_acc: 0.9310
    Epoch 291/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0643 - acc: 0.9500 - val_loss: 0.0709 - val_acc: 0.9310
    Epoch 292/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0643 - acc: 0.9500 - val_loss: 0.0702 - val_acc: 0.9310
    Epoch 293/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0640 - acc: 0.9500 - val_loss: 0.0702 - val_acc: 0.9310
    Epoch 294/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0640 - acc: 0.9500 - val_loss: 0.0708 - val_acc: 0.9310
    Epoch 295/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0638 - acc: 0.9500 - val_loss: 0.0702 - val_acc: 0.9310
    Epoch 296/5000
    4/4 [==============================] - 0s 9ms/step - loss: 0.0636 - acc: 0.9500 - val_loss: 0.0697 - val_acc: 0.9310
    Epoch 297/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0635 - acc: 0.9500 - val_loss: 0.0701 - val_acc: 0.9310
    Epoch 298/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0633 - acc: 0.9500 - val_loss: 0.0699 - val_acc: 0.9310
    Epoch 299/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0634 - acc: 0.9500 - val_loss: 0.0700 - val_acc: 0.9310
    Epoch 300/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0630 - acc: 0.9500 - val_loss: 0.0690 - val_acc: 0.9310
    Epoch 301/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0632 - acc: 0.9583 - val_loss: 0.0678 - val_acc: 0.9310
    Epoch 302/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0627 - acc: 0.9583 - val_loss: 0.0685 - val_acc: 0.9310
    Epoch 303/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0626 - acc: 0.9583 - val_loss: 0.0695 - val_acc: 0.9310
    Epoch 304/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0625 - acc: 0.9500 - val_loss: 0.0699 - val_acc: 0.9310
    Epoch 305/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0625 - acc: 0.9500 - val_loss: 0.0683 - val_acc: 0.9310
    Epoch 306/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0622 - acc: 0.9500 - val_loss: 0.0685 - val_acc: 0.9310
    Epoch 307/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0620 - acc: 0.9500 - val_loss: 0.0683 - val_acc: 0.9310
    Epoch 308/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0618 - acc: 0.9583 - val_loss: 0.0674 - val_acc: 0.9310
    Epoch 309/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0617 - acc: 0.9583 - val_loss: 0.0670 - val_acc: 0.9310
    Epoch 310/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0617 - acc: 0.9583 - val_loss: 0.0674 - val_acc: 0.9310
    Epoch 311/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0614 - acc: 0.9583 - val_loss: 0.0670 - val_acc: 0.9310
    Epoch 312/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0614 - acc: 0.9583 - val_loss: 0.0665 - val_acc: 0.9310
    Epoch 313/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0613 - acc: 0.9583 - val_loss: 0.0676 - val_acc: 0.9310
    Epoch 314/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0611 - acc: 0.9583 - val_loss: 0.0671 - val_acc: 0.9310
    Epoch 315/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0610 - acc: 0.9583 - val_loss: 0.0672 - val_acc: 0.9310
    Epoch 316/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0608 - acc: 0.9583 - val_loss: 0.0667 - val_acc: 0.9310
    Epoch 317/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0607 - acc: 0.9583 - val_loss: 0.0658 - val_acc: 0.9310
    Epoch 318/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0606 - acc: 0.9583 - val_loss: 0.0652 - val_acc: 0.9310
    Epoch 319/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0605 - acc: 0.9583 - val_loss: 0.0658 - val_acc: 0.9310
    Epoch 320/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0603 - acc: 0.9583 - val_loss: 0.0658 - val_acc: 0.9310
    Epoch 321/5000
    4/4 [==============================] - 0s 10ms/step - loss: 0.0602 - acc: 0.9583 - val_loss: 0.0651 - val_acc: 0.9310
    Epoch 322/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0600 - acc: 0.9583 - val_loss: 0.0647 - val_acc: 0.9310
    Epoch 323/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0600 - acc: 0.9583 - val_loss: 0.0644 - val_acc: 0.9310
    Epoch 324/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0598 - acc: 0.9583 - val_loss: 0.0646 - val_acc: 0.9310
    Epoch 325/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0597 - acc: 0.9583 - val_loss: 0.0650 - val_acc: 0.9310
    Epoch 326/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0596 - acc: 0.9583 - val_loss: 0.0642 - val_acc: 0.9310
    Epoch 327/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0594 - acc: 0.9583 - val_loss: 0.0643 - val_acc: 0.9310
    Epoch 328/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0593 - acc: 0.9583 - val_loss: 0.0637 - val_acc: 0.9310
    Epoch 329/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0592 - acc: 0.9583 - val_loss: 0.0636 - val_acc: 0.9310
    Epoch 330/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0591 - acc: 0.9583 - val_loss: 0.0636 - val_acc: 0.9310
    Epoch 331/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0589 - acc: 0.9583 - val_loss: 0.0637 - val_acc: 0.9310
    Epoch 332/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0590 - acc: 0.9583 - val_loss: 0.0641 - val_acc: 0.9310
    Epoch 333/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0587 - acc: 0.9583 - val_loss: 0.0631 - val_acc: 0.9310
    Epoch 334/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0586 - acc: 0.9583 - val_loss: 0.0624 - val_acc: 0.9310
    Epoch 335/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0585 - acc: 0.9583 - val_loss: 0.0621 - val_acc: 0.9310
    Epoch 336/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0586 - acc: 0.9583 - val_loss: 0.0613 - val_acc: 0.9655
    Epoch 337/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0583 - acc: 0.9583 - val_loss: 0.0620 - val_acc: 0.9310
    Epoch 338/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0583 - acc: 0.9583 - val_loss: 0.0630 - val_acc: 0.9310
    Epoch 339/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0581 - acc: 0.9583 - val_loss: 0.0625 - val_acc: 0.9310
    Epoch 340/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0579 - acc: 0.9583 - val_loss: 0.0622 - val_acc: 0.9310
    Epoch 341/5000
    4/4 [==============================] - 0s 9ms/step - loss: 0.0578 - acc: 0.9583 - val_loss: 0.0617 - val_acc: 0.9310
    Epoch 342/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0577 - acc: 0.9583 - val_loss: 0.0613 - val_acc: 0.9655
    Epoch 343/5000
    4/4 [==============================] - 0s 10ms/step - loss: 0.0576 - acc: 0.9583 - val_loss: 0.0612 - val_acc: 0.9655
    Epoch 344/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0574 - acc: 0.9583 - val_loss: 0.0618 - val_acc: 0.9310
    Epoch 345/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0574 - acc: 0.9583 - val_loss: 0.0622 - val_acc: 0.9310
    Epoch 346/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0574 - acc: 0.9583 - val_loss: 0.0614 - val_acc: 0.9310
    Epoch 347/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0571 - acc: 0.9583 - val_loss: 0.0610 - val_acc: 0.9310
    Epoch 348/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0573 - acc: 0.9583 - val_loss: 0.0601 - val_acc: 0.9655
    Epoch 349/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0569 - acc: 0.9583 - val_loss: 0.0606 - val_acc: 0.9655
    Epoch 350/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0569 - acc: 0.9583 - val_loss: 0.0603 - val_acc: 0.9655
    Epoch 351/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0567 - acc: 0.9583 - val_loss: 0.0606 - val_acc: 0.9310
    Epoch 352/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0567 - acc: 0.9583 - val_loss: 0.0605 - val_acc: 0.9310
    Epoch 353/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0566 - acc: 0.9583 - val_loss: 0.0598 - val_acc: 0.9655
    Epoch 354/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0565 - acc: 0.9583 - val_loss: 0.0602 - val_acc: 0.9655
    Epoch 355/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0563 - acc: 0.9583 - val_loss: 0.0601 - val_acc: 0.9655
    Epoch 356/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0563 - acc: 0.9583 - val_loss: 0.0588 - val_acc: 0.9655
    Epoch 357/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0561 - acc: 0.9583 - val_loss: 0.0585 - val_acc: 0.9655
    Epoch 358/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0561 - acc: 0.9583 - val_loss: 0.0591 - val_acc: 0.9655
    Epoch 359/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0559 - acc: 0.9583 - val_loss: 0.0588 - val_acc: 0.9655
    Epoch 360/5000
    4/4 [==============================] - 0s 6ms/step - loss: 0.0558 - acc: 0.9583 - val_loss: 0.0585 - val_acc: 0.9655
    Epoch 361/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0558 - acc: 0.9583 - val_loss: 0.0586 - val_acc: 0.9655
    Epoch 362/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0556 - acc: 0.9583 - val_loss: 0.0577 - val_acc: 0.9655
    Epoch 363/5000
    4/4 [==============================] - 0s 10ms/step - loss: 0.0555 - acc: 0.9583 - val_loss: 0.0574 - val_acc: 1.0000
    Epoch 364/5000
    4/4 [==============================] - 0s 9ms/step - loss: 0.0554 - acc: 0.9583 - val_loss: 0.0573 - val_acc: 1.0000
    Epoch 365/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0553 - acc: 0.9583 - val_loss: 0.0573 - val_acc: 1.0000
    Epoch 366/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0552 - acc: 0.9583 - val_loss: 0.0577 - val_acc: 0.9655
    Epoch 367/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0551 - acc: 0.9583 - val_loss: 0.0578 - val_acc: 0.9655
    Epoch 368/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0551 - acc: 0.9583 - val_loss: 0.0574 - val_acc: 0.9655
    Epoch 369/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0549 - acc: 0.9583 - val_loss: 0.0572 - val_acc: 0.9655
    Epoch 370/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0548 - acc: 0.9583 - val_loss: 0.0574 - val_acc: 0.9655
    Epoch 371/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0548 - acc: 0.9583 - val_loss: 0.0568 - val_acc: 1.0000
    Epoch 372/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0547 - acc: 0.9583 - val_loss: 0.0565 - val_acc: 1.0000
    Epoch 373/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0546 - acc: 0.9583 - val_loss: 0.0571 - val_acc: 0.9655
    Epoch 374/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0545 - acc: 0.9583 - val_loss: 0.0572 - val_acc: 0.9655
    Epoch 375/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0544 - acc: 0.9583 - val_loss: 0.0566 - val_acc: 0.9655
    Epoch 376/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0543 - acc: 0.9583 - val_loss: 0.0558 - val_acc: 1.0000
    Epoch 377/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0542 - acc: 0.9583 - val_loss: 0.0558 - val_acc: 1.0000
    Epoch 378/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0541 - acc: 0.9583 - val_loss: 0.0558 - val_acc: 1.0000
    Epoch 379/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0541 - acc: 0.9583 - val_loss: 0.0562 - val_acc: 1.0000
    Epoch 380/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0540 - acc: 0.9583 - val_loss: 0.0554 - val_acc: 1.0000
    Epoch 381/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0540 - acc: 0.9583 - val_loss: 0.0559 - val_acc: 1.0000
    Epoch 382/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0538 - acc: 0.9583 - val_loss: 0.0557 - val_acc: 1.0000
    Epoch 383/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0538 - acc: 0.9583 - val_loss: 0.0546 - val_acc: 1.0000
    Epoch 384/5000
    4/4 [==============================] - 0s 9ms/step - loss: 0.0537 - acc: 0.9583 - val_loss: 0.0547 - val_acc: 1.0000
    Epoch 385/5000
    4/4 [==============================] - 0s 9ms/step - loss: 0.0537 - acc: 0.9583 - val_loss: 0.0545 - val_acc: 1.0000
    Epoch 386/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0536 - acc: 0.9583 - val_loss: 0.0556 - val_acc: 1.0000
    Epoch 387/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0534 - acc: 0.9583 - val_loss: 0.0556 - val_acc: 1.0000
    Epoch 388/5000
    4/4 [==============================] - 0s 9ms/step - loss: 0.0535 - acc: 0.9583 - val_loss: 0.0550 - val_acc: 1.0000
    Epoch 389/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0533 - acc: 0.9583 - val_loss: 0.0551 - val_acc: 1.0000
    Epoch 390/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0533 - acc: 0.9583 - val_loss: 0.0555 - val_acc: 1.0000
    Epoch 391/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0532 - acc: 0.9583 - val_loss: 0.0552 - val_acc: 1.0000
    Epoch 392/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0531 - acc: 0.9583 - val_loss: 0.0549 - val_acc: 1.0000
    Epoch 393/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0531 - acc: 0.9583 - val_loss: 0.0539 - val_acc: 1.0000
    Epoch 394/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0530 - acc: 0.9583 - val_loss: 0.0538 - val_acc: 1.0000
    Epoch 395/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0533 - acc: 0.9583 - val_loss: 0.0530 - val_acc: 1.0000
    Epoch 396/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0529 - acc: 0.9583 - val_loss: 0.0543 - val_acc: 1.0000
    Epoch 397/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0530 - acc: 0.9583 - val_loss: 0.0550 - val_acc: 1.0000
    Epoch 398/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0529 - acc: 0.9583 - val_loss: 0.0536 - val_acc: 1.0000
    Epoch 399/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0526 - acc: 0.9583 - val_loss: 0.0534 - val_acc: 1.0000
    Epoch 400/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0527 - acc: 0.9583 - val_loss: 0.0528 - val_acc: 1.0000
    Epoch 401/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0526 - acc: 0.9583 - val_loss: 0.0538 - val_acc: 1.0000
    Epoch 402/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0524 - acc: 0.9583 - val_loss: 0.0537 - val_acc: 1.0000
    Epoch 403/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0523 - acc: 0.9583 - val_loss: 0.0530 - val_acc: 1.0000
    Epoch 404/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0522 - acc: 0.9583 - val_loss: 0.0525 - val_acc: 1.0000
    ........................................
    
    Epoch 4990/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0207 - acc: 0.9833 - val_loss: 0.0066 - val_acc: 1.0000
    Epoch 4991/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0201 - acc: 0.9833 - val_loss: 0.0062 - val_acc: 1.0000
    Epoch 4992/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0202 - acc: 0.9750 - val_loss: 0.0063 - val_acc: 1.0000
    Epoch 4993/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0200 - acc: 0.9833 - val_loss: 0.0065 - val_acc: 1.0000
    Epoch 4994/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0202 - acc: 0.9833 - val_loss: 0.0065 - val_acc: 1.0000
    Epoch 4995/5000
    4/4 [==============================] - 0s 9ms/step - loss: 0.0204 - acc: 0.9833 - val_loss: 0.0063 - val_acc: 1.0000
    Epoch 4996/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0200 - acc: 0.9833 - val_loss: 0.0063 - val_acc: 1.0000
    Epoch 4997/5000
    4/4 [==============================] - 0s 8ms/step - loss: 0.0204 - acc: 0.9750 - val_loss: 0.0063 - val_acc: 1.0000
    Epoch 4998/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0204 - acc: 0.9833 - val_loss: 0.0064 - val_acc: 1.0000
    Epoch 4999/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0201 - acc: 0.9833 - val_loss: 0.0066 - val_acc: 1.0000
    Epoch 5000/5000
    4/4 [==============================] - 0s 7ms/step - loss: 0.0201 - acc: 0.9833 - val_loss: 0.0064 - val_acc: 1.0000
    
    In [8]:
    # 把epoch当横左边,把loss当纵坐标
    plt.plot(history.epoch,history.history.get('loss'))
    plt.show()
    
    In [9]:
    plt.plot(history.epoch,history.history.get('val_acc'))
    plt.title("test data acc")
    plt.show()
    

    5、检验模型

    In [10]:
    pridict_y=model.predict(test_x)
    print(pridict_y)
    print(test_y)
    
    [[ 1.0565193e+00 -2.6889920e-02 -1.4720589e-02]
     [-6.2308311e-03  1.0293320e+00 -1.9791573e-02]
     [-6.1598510e-02  1.1274689e+00 -6.0042202e-02]
     [-5.4454565e-02  9.0536302e-01  1.5964857e-01]
     [ 3.8922548e-02  7.4594215e-02  9.0920663e-01]
     [-4.3319345e-02  1.0453464e+00  4.2278469e-03]
     [ 6.5247595e-02  1.0222425e+00 -8.0829531e-02]
     [-4.1642666e-02  9.7465175e-01  7.5081468e-02]
     [-3.0709654e-02  1.0207720e+00  9.9766850e-03]
     [ 9.2975128e-01  6.5912709e-02  4.1824669e-02]
     [ 9.1035056e-01  9.0161189e-02  3.5780758e-02]
     [ 9.9654549e-01 -2.0576075e-02  4.8277467e-02]
     [ 9.5139623e-01  8.6834028e-02 -2.6680857e-02]
     [ 9.1800302e-01  1.1167152e-01 -4.8157275e-03]
     [ 6.9141388e-05  8.7840325e-01  1.3010237e-01]
     [-2.4678916e-02  9.6513385e-01  7.0031434e-02]
     [ 9.7465920e-01  7.3628679e-02 -7.7703744e-02]
     [-1.3774335e-02  8.9502794e-01  1.2773290e-01]
     [ 8.9697993e-01  1.2705387e-01  2.8292835e-03]
     [ 5.7709873e-02  9.7175795e-01 -2.4247855e-02]
     [-3.4542620e-02  8.8021189e-01  1.6434848e-01]
     [ 2.1483630e-02  2.5068894e-02  9.7806406e-01]
     [ 3.8601160e-03  3.1894189e-01  7.0536506e-01]
     [ 9.4212979e-01  8.0834672e-02  1.5474647e-02]
     [ 2.0926297e-03  6.7882553e-02  9.5009637e-01]
     [ 1.0249877e+00  1.8325776e-02 -5.5281550e-02]
     [ 9.9468207e-01  2.7860314e-02  2.5103986e-03]
     [ 1.6328961e-02  2.0112351e-02  1.0003220e+00]
     [-1.8210649e-02  9.1097170e-01  1.1046210e-01]]
    tf.Tensor(
    [[1. 0. 0.]
     [0. 1. 0.]
     [0. 1. 0.]
     [0. 1. 0.]
     [0. 0. 1.]
     [0. 1. 0.]
     [0. 1. 0.]
     [0. 1. 0.]
     [0. 1. 0.]
     [1. 0. 0.]
     [1. 0. 0.]
     [1. 0. 0.]
     [1. 0. 0.]
     [1. 0. 0.]
     [0. 1. 0.]
     [0. 1. 0.]
     [1. 0. 0.]
     [0. 1. 0.]
     [1. 0. 0.]
     [0. 1. 0.]
     [0. 1. 0.]
     [0. 0. 1.]
     [0. 0. 1.]
     [1. 0. 0.]
     [0. 0. 1.]
     [1. 0. 0.]
     [1. 0. 0.]
     [0. 0. 1.]
     [0. 1. 0.]], shape=(29, 3), dtype=float32)
    
    In [11]:
    # 在pridict_y中找最大值的索引,横向
    pridict_y = tf.argmax(pridict_y, axis=1)
    print(pridict_y)
    #
    test_y = tf.argmax(test_y, axis=1)
    print(test_y)
    
    tf.Tensor([0 1 1 1 2 1 1 1 1 0 0 0 0 0 1 1 0 1 0 1 1 2 2 0 2 0 0 2 1], shape=(29,), dtype=int64)
    tf.Tensor([0 1 1 1 2 1 1 1 1 0 0 0 0 0 1 1 0 1 0 1 1 2 2 0 2 0 0 2 1], shape=(29,), dtype=int64)
    
    In [ ]:
     
     
    我的旨在学过的东西不再忘记(主要使用艾宾浩斯遗忘曲线算法及其它智能学习复习算法)的偏公益性质的完全免费的编程视频学习网站: fanrenyi.com;有各种前端、后端、算法、大数据、人工智能等课程。
    博主25岁,前端后端算法大数据人工智能都有兴趣。
    大家有啥都可以加博主联系方式(qq404006308,微信fan404006308)互相交流。工作、生活、心境,可以互相启迪。
    聊技术,交朋友,修心境,qq404006308,微信fan404006308
    26岁,真心找女朋友,非诚勿扰,微信fan404006308,qq404006308
    人工智能群:939687837

    作者相关推荐

  • 相关阅读:
    Tabular DataStream protocol 协议
    Redis 分片实现 Redis Shard [www]
    进程线程协程那些事儿
    Linux下用freetds执行SQL Server的sql语句和存储过程
    unixODBC
    在linux下有没有什么软件可以连接windows上的MSSQL SERVER
    Nginx使用ssl模块配置HTTPS支持
    谈一款MOBA类游戏《码神联盟》的服务端架构设计与实现
    core dump使用方法、设置、测试用例
    linux下生成core dump文件方法及设置
  • 原文地址:https://www.cnblogs.com/Renyi-Fan/p/13667098.html
Copyright © 2011-2022 走看看