0%

Python数据科学_24_Tensorflow2(高阶API)

高阶API

准备数据

1
from sklearn.datasets import load_iris
1
2
3
4
x = load_iris()['data']
y = load_iris()['target']
print(x.shape)
print(y.shape)
(150, 4)
(150,)
1
y
array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
       2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
       2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2])
1
from tensorflow import one_hot
1
2
# one_hot编码转换
one_hot(y, depth=3)
<tf.Tensor: shape=(150, 3), dtype=float32, numpy=
array([[1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [1., 0., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 1., 0.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.],
       [0., 0., 1.]], dtype=float32)>

模型的搭建

  • 定义BP神经网络模型
  • hidden_num = (5, 6, 3)
1
from tensorflow.keras import layers

顺序式

1
from tensorflow import keras
1
2
3
4
5
6
7
8
model1 = keras.Sequential()  # 定义一个容器
model1.add(layers.Dense(5, input_shape=(4, ), activation='relu'))
model1.add(layers.Dense(6, activation='relu'))
model1.add(layers.Dense(3, activation='softmax'))
# softmax函数
# 生成一个单位向量,每个位置上的值表示相应类别的概率
# (0.1, 0.2, 0.7)
# 在归类时,选出概率最高的一类进行归类即可
1
2
# 打印模型的摘要信息
model1.summary()
Model: "sequential_3"
_________________________________________________________________
 Layer (type)                Output Shape              Param #   
=================================================================
 dense_46 (Dense)            (None, 5)                 25        

 dense_47 (Dense)            (None, 6)                 36        

 dense_48 (Dense)            (None, 3)                 21        

=================================================================
Total params: 82
Trainable params: 82
Non-trainable params: 0
_________________________________________________________________

函数式

1
2
3
4
5
6
# 定义模型输入
inputs = keras.Input(shape=(4, ))
hidden1 = layers.Dense(5, activation='relu')(inputs)
hidden2 = layers.Dense(6, activation='relu')(hidden1)
outputs = layers.Dense(3, activation='relu')(hidden2)
model2 = keras.Model(inputs=inputs, outputs=outputs)
1
model2.summary()
Model: "model_1"
_________________________________________________________________
 Layer (type)                Output Shape              Param #   
=================================================================
 input_2 (InputLayer)        [(None, 4)]               0         

 dense_10 (Dense)            (None, 5)                 25        

 dense_11 (Dense)            (None, 6)                 36        

 dense_12 (Dense)            (None, 3)                 21        

=================================================================
Total params: 82
Trainable params: 82
Non-trainable params: 0
_________________________________________________________________

子类式

1
2
3
4
5
6
7
8
9
10
11
class MyModel(keras.models.Model):
def __init__(self):
super(MyModel, self).__init__()
self.hidden1 = layers.Dense(5, activation='relu')
self.hidden2 = layers.Dense(6, activation='relu')
self.outputs = layers.Dense(3, activation='relu')
def call(self, x):
x = self.hidden1(x)
x = self.hidden2(x)
output = self.outputs(x)
return output
1
2
3
# 实例化模型
model3 = MyModel()
model3.build(input_shape=(1, 4))
1
model3.summary()
Model: "my_model_10"
_________________________________________________________________
 Layer (type)                Output Shape              Param #   
=================================================================
 dense_43 (Dense)            multiple                  25        

 dense_44 (Dense)            multiple                  36        

 dense_45 (Dense)            multiple                  21        

=================================================================
Total params: 82
Trainable params: 82
Non-trainable params: 0
_________________________________________________________________

模型的编译

模型的编译过程是指提前指定模型在训练过程中需要使用的损失函数、评价函数以及优化器

1
2
3
from tensorflow.keras import losses
from tensorflow.keras import metrics
from tensorflow.keras import optimizers
1
2
3
model1.compile(loss=losses.sparse_categorical_crossentropy,
metrics=metrics.sparse_categorical_accuracy,
optimizer=optimizers.Adam())

模型的训练

1
2
# 可以将fit函数的返回值接收起来,里面包含所有的训练过程数据
history = model1.fit(x=x, y=y, batch_size=4, epochs=500, validation_split=0.1)
Epoch 1/500
34/34 [==============================] - 0s 4ms/step - loss: 1.6059 - sparse_categorical_accuracy: 0.3704 - val_loss: 2.7501 - val_sparse_categorical_accuracy: 0.0000e+00
Epoch 2/500
34/34 [==============================] - 0s 1ms/step - loss: 1.3034 - sparse_categorical_accuracy: 0.3704 - val_loss: 2.0401 - val_sparse_categorical_accuracy: 0.0000e+00
Epoch 3/500
34/34 [==============================] - 0s 2ms/step - loss: 1.1285 - sparse_categorical_accuracy: 0.3704 - val_loss: 1.5591 - val_sparse_categorical_accuracy: 0.0000e+00
Epoch 4/500
34/34 [==============================] - 0s 1ms/step - loss: 1.0149 - sparse_categorical_accuracy: 0.3852 - val_loss: 1.2489 - val_sparse_categorical_accuracy: 0.0000e+00
Epoch 5/500
34/34 [==============================] - 0s 2ms/step - loss: 0.9359 - sparse_categorical_accuracy: 0.7556 - val_loss: 1.0802 - val_sparse_categorical_accuracy: 0.0000e+00
Epoch 6/500
34/34 [==============================] - 0s 2ms/step - loss: 0.8684 - sparse_categorical_accuracy: 0.8667 - val_loss: 0.9373 - val_sparse_categorical_accuracy: 0.8000
Epoch 7/500
34/34 [==============================] - 0s 2ms/step - loss: 0.8072 - sparse_categorical_accuracy: 0.9481 - val_loss: 0.8674 - val_sparse_categorical_accuracy: 0.9333
Epoch 8/500
34/34 [==============================] - 0s 2ms/step - loss: 0.7516 - sparse_categorical_accuracy: 0.9481 - val_loss: 0.8141 - val_sparse_categorical_accuracy: 1.0000
Epoch 9/500
34/34 [==============================] - 0s 2ms/step - loss: 0.7004 - sparse_categorical_accuracy: 0.9333 - val_loss: 0.8043 - val_sparse_categorical_accuracy: 0.8667
Epoch 10/500
34/34 [==============================] - 0s 2ms/step - loss: 0.6542 - sparse_categorical_accuracy: 0.9259 - val_loss: 0.7654 - val_sparse_categorical_accuracy: 0.8667
Epoch 11/500
34/34 [==============================] - 0s 2ms/step - loss: 0.6110 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.7209 - val_sparse_categorical_accuracy: 1.0000
Epoch 12/500
34/34 [==============================] - 0s 2ms/step - loss: 0.5752 - sparse_categorical_accuracy: 0.9407 - val_loss: 0.6891 - val_sparse_categorical_accuracy: 1.0000
Epoch 13/500
34/34 [==============================] - 0s 2ms/step - loss: 0.5447 - sparse_categorical_accuracy: 0.9333 - val_loss: 0.7277 - val_sparse_categorical_accuracy: 0.8000
Epoch 14/500
34/34 [==============================] - 0s 2ms/step - loss: 0.5174 - sparse_categorical_accuracy: 0.9259 - val_loss: 0.6848 - val_sparse_categorical_accuracy: 0.8667
Epoch 15/500
34/34 [==============================] - 0s 1ms/step - loss: 0.4940 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.6780 - val_sparse_categorical_accuracy: 0.8667
Epoch 16/500
34/34 [==============================] - 0s 2ms/step - loss: 0.4764 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.6551 - val_sparse_categorical_accuracy: 0.9333
Epoch 17/500
34/34 [==============================] - 0s 1ms/step - loss: 0.4624 - sparse_categorical_accuracy: 0.9037 - val_loss: 0.6625 - val_sparse_categorical_accuracy: 0.8667
Epoch 18/500
34/34 [==============================] - 0s 2ms/step - loss: 0.4435 - sparse_categorical_accuracy: 0.9481 - val_loss: 0.6719 - val_sparse_categorical_accuracy: 0.8667
Epoch 19/500
34/34 [==============================] - 0s 2ms/step - loss: 0.4309 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.6565 - val_sparse_categorical_accuracy: 0.8667
Epoch 20/500
34/34 [==============================] - 0s 2ms/step - loss: 0.4193 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.6312 - val_sparse_categorical_accuracy: 0.9333
Epoch 21/500
34/34 [==============================] - 0s 2ms/step - loss: 0.4090 - sparse_categorical_accuracy: 0.9259 - val_loss: 0.6389 - val_sparse_categorical_accuracy: 0.8667
Epoch 22/500
34/34 [==============================] - 0s 2ms/step - loss: 0.3985 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.6377 - val_sparse_categorical_accuracy: 0.8667
Epoch 23/500
34/34 [==============================] - 0s 2ms/step - loss: 0.3903 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.6134 - val_sparse_categorical_accuracy: 0.9333
Epoch 24/500
34/34 [==============================] - 0s 1ms/step - loss: 0.3799 - sparse_categorical_accuracy: 0.9111 - val_loss: 0.6304 - val_sparse_categorical_accuracy: 0.8667
Epoch 25/500
34/34 [==============================] - 0s 1ms/step - loss: 0.3668 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.5841 - val_sparse_categorical_accuracy: 0.9333
Epoch 26/500
34/34 [==============================] - 0s 1ms/step - loss: 0.3560 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.6161 - val_sparse_categorical_accuracy: 0.8667
Epoch 27/500
34/34 [==============================] - 0s 2ms/step - loss: 0.3432 - sparse_categorical_accuracy: 0.9407 - val_loss: 0.5765 - val_sparse_categorical_accuracy: 0.9333
Epoch 28/500
34/34 [==============================] - 0s 1ms/step - loss: 0.3305 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.5548 - val_sparse_categorical_accuracy: 0.9333
Epoch 29/500
34/34 [==============================] - 0s 1ms/step - loss: 0.3157 - sparse_categorical_accuracy: 0.9407 - val_loss: 0.5301 - val_sparse_categorical_accuracy: 0.9333
Epoch 30/500
34/34 [==============================] - 0s 2ms/step - loss: 0.3039 - sparse_categorical_accuracy: 0.9481 - val_loss: 0.5031 - val_sparse_categorical_accuracy: 0.9333
Epoch 31/500
34/34 [==============================] - 0s 2ms/step - loss: 0.2975 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.6156 - val_sparse_categorical_accuracy: 0.6667
Epoch 32/500
34/34 [==============================] - 0s 2ms/step - loss: 0.2823 - sparse_categorical_accuracy: 0.9481 - val_loss: 0.4653 - val_sparse_categorical_accuracy: 0.9333
Epoch 33/500
34/34 [==============================] - 0s 2ms/step - loss: 0.2749 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.4101 - val_sparse_categorical_accuracy: 0.9333
Epoch 34/500
34/34 [==============================] - 0s 1ms/step - loss: 0.2606 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.5646 - val_sparse_categorical_accuracy: 0.8667
Epoch 35/500
34/34 [==============================] - 0s 1ms/step - loss: 0.2567 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.3824 - val_sparse_categorical_accuracy: 1.0000
Epoch 36/500
34/34 [==============================] - 0s 1ms/step - loss: 0.2441 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.5872 - val_sparse_categorical_accuracy: 0.6667
Epoch 37/500
34/34 [==============================] - 0s 1ms/step - loss: 0.2348 - sparse_categorical_accuracy: 0.9407 - val_loss: 0.3833 - val_sparse_categorical_accuracy: 0.9333
Epoch 38/500
34/34 [==============================] - 0s 2ms/step - loss: 0.2296 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.4319 - val_sparse_categorical_accuracy: 0.9333
Epoch 39/500
34/34 [==============================] - 0s 1ms/step - loss: 0.2222 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.4931 - val_sparse_categorical_accuracy: 0.8667
Epoch 40/500
34/34 [==============================] - 0s 2ms/step - loss: 0.2141 - sparse_categorical_accuracy: 0.9481 - val_loss: 0.4127 - val_sparse_categorical_accuracy: 0.9333
Epoch 41/500
34/34 [==============================] - 0s 1ms/step - loss: 0.2072 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.3820 - val_sparse_categorical_accuracy: 0.9333
Epoch 42/500
34/34 [==============================] - 0s 2ms/step - loss: 0.2005 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.4160 - val_sparse_categorical_accuracy: 0.9333
Epoch 43/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1978 - sparse_categorical_accuracy: 0.9481 - val_loss: 0.3869 - val_sparse_categorical_accuracy: 0.9333
Epoch 44/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1932 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.3729 - val_sparse_categorical_accuracy: 0.9333
Epoch 45/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1834 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.2934 - val_sparse_categorical_accuracy: 0.9333
Epoch 46/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1817 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.3738 - val_sparse_categorical_accuracy: 0.9333
Epoch 47/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1780 - sparse_categorical_accuracy: 0.9481 - val_loss: 0.3115 - val_sparse_categorical_accuracy: 0.9333
Epoch 48/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1739 - sparse_categorical_accuracy: 0.9481 - val_loss: 0.2692 - val_sparse_categorical_accuracy: 1.0000
Epoch 49/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1667 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.3299 - val_sparse_categorical_accuracy: 0.9333
Epoch 50/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1632 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.3059 - val_sparse_categorical_accuracy: 0.9333
Epoch 51/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1582 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.3259 - val_sparse_categorical_accuracy: 0.9333
Epoch 52/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1596 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.3268 - val_sparse_categorical_accuracy: 0.9333
Epoch 53/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1623 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.4212 - val_sparse_categorical_accuracy: 0.9333
Epoch 54/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1518 - sparse_categorical_accuracy: 0.9407 - val_loss: 0.2612 - val_sparse_categorical_accuracy: 0.9333
Epoch 55/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1462 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.2478 - val_sparse_categorical_accuracy: 0.9333
Epoch 56/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1582 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.3228 - val_sparse_categorical_accuracy: 0.9333
Epoch 57/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1388 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.2116 - val_sparse_categorical_accuracy: 1.0000
Epoch 58/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1403 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.2753 - val_sparse_categorical_accuracy: 0.9333
Epoch 59/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1358 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.2042 - val_sparse_categorical_accuracy: 1.0000
Epoch 60/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1324 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.2860 - val_sparse_categorical_accuracy: 0.9333
Epoch 61/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1387 - sparse_categorical_accuracy: 0.9481 - val_loss: 0.1378 - val_sparse_categorical_accuracy: 1.0000
Epoch 62/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1344 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.2353 - val_sparse_categorical_accuracy: 0.9333
Epoch 63/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1278 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1833 - val_sparse_categorical_accuracy: 1.0000
Epoch 64/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1258 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.3006 - val_sparse_categorical_accuracy: 0.9333
Epoch 65/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1256 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.2114 - val_sparse_categorical_accuracy: 0.9333
Epoch 66/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1228 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.2390 - val_sparse_categorical_accuracy: 0.9333
Epoch 67/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1182 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1731 - val_sparse_categorical_accuracy: 1.0000
Epoch 68/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1187 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.2332 - val_sparse_categorical_accuracy: 0.9333
Epoch 69/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1213 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.1506 - val_sparse_categorical_accuracy: 1.0000
Epoch 70/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1156 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.2886 - val_sparse_categorical_accuracy: 0.9333
Epoch 71/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1112 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1822 - val_sparse_categorical_accuracy: 0.9333
Epoch 72/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1129 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.2088 - val_sparse_categorical_accuracy: 0.9333
Epoch 73/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1142 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.1921 - val_sparse_categorical_accuracy: 0.9333
Epoch 74/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1078 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.2068 - val_sparse_categorical_accuracy: 0.9333
Epoch 75/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1100 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.2708 - val_sparse_categorical_accuracy: 0.9333
Epoch 76/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1126 - sparse_categorical_accuracy: 0.9481 - val_loss: 0.1501 - val_sparse_categorical_accuracy: 1.0000
Epoch 77/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1063 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1652 - val_sparse_categorical_accuracy: 1.0000
Epoch 78/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1055 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1464 - val_sparse_categorical_accuracy: 1.0000
Epoch 79/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1038 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1838 - val_sparse_categorical_accuracy: 0.9333
Epoch 80/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1036 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1646 - val_sparse_categorical_accuracy: 0.9333
Epoch 81/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1027 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1813 - val_sparse_categorical_accuracy: 0.9333
Epoch 82/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1038 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.2505 - val_sparse_categorical_accuracy: 0.9333
Epoch 83/500
34/34 [==============================] - 0s 1ms/step - loss: 0.1064 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.2342 - val_sparse_categorical_accuracy: 0.9333
Epoch 84/500
34/34 [==============================] - 0s 2ms/step - loss: 0.1019 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.1177 - val_sparse_categorical_accuracy: 1.0000
Epoch 85/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0960 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.2084 - val_sparse_categorical_accuracy: 0.9333
Epoch 86/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0979 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1725 - val_sparse_categorical_accuracy: 0.9333
Epoch 87/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0968 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1479 - val_sparse_categorical_accuracy: 1.0000
Epoch 88/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0950 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1710 - val_sparse_categorical_accuracy: 0.9333
Epoch 89/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0966 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.1835 - val_sparse_categorical_accuracy: 0.9333
Epoch 90/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0961 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1863 - val_sparse_categorical_accuracy: 0.9333
Epoch 91/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0949 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1176 - val_sparse_categorical_accuracy: 1.0000
Epoch 92/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0923 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1631 - val_sparse_categorical_accuracy: 0.9333
Epoch 93/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0943 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1568 - val_sparse_categorical_accuracy: 0.9333
Epoch 94/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0968 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1498 - val_sparse_categorical_accuracy: 0.9333
Epoch 95/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0916 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1312 - val_sparse_categorical_accuracy: 1.0000
Epoch 96/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0908 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1481 - val_sparse_categorical_accuracy: 0.9333
Epoch 97/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0893 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1198 - val_sparse_categorical_accuracy: 1.0000
Epoch 98/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0914 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1385 - val_sparse_categorical_accuracy: 0.9333
Epoch 99/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0880 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1255 - val_sparse_categorical_accuracy: 1.0000
Epoch 100/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0863 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1692 - val_sparse_categorical_accuracy: 0.9333
Epoch 101/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0940 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.1014 - val_sparse_categorical_accuracy: 1.0000
Epoch 102/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0888 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1539 - val_sparse_categorical_accuracy: 0.9333
Epoch 103/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0873 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1255 - val_sparse_categorical_accuracy: 1.0000
Epoch 104/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0912 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1315 - val_sparse_categorical_accuracy: 0.9333
Epoch 105/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0842 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1781 - val_sparse_categorical_accuracy: 0.9333
Epoch 106/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0868 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1068 - val_sparse_categorical_accuracy: 1.0000
Epoch 107/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0873 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1192 - val_sparse_categorical_accuracy: 1.0000
Epoch 108/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0839 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1289 - val_sparse_categorical_accuracy: 0.9333
Epoch 109/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0820 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1417 - val_sparse_categorical_accuracy: 0.9333
Epoch 110/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0845 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1581 - val_sparse_categorical_accuracy: 0.9333
Epoch 111/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0843 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.0956 - val_sparse_categorical_accuracy: 1.0000
Epoch 112/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0841 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1017 - val_sparse_categorical_accuracy: 1.0000
Epoch 113/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0802 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1839 - val_sparse_categorical_accuracy: 0.9333
Epoch 114/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0805 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1084 - val_sparse_categorical_accuracy: 1.0000
Epoch 115/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0821 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1494 - val_sparse_categorical_accuracy: 0.9333
Epoch 116/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0817 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1517 - val_sparse_categorical_accuracy: 0.9333
Epoch 117/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0813 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1059 - val_sparse_categorical_accuracy: 1.0000
Epoch 118/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0851 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.0949 - val_sparse_categorical_accuracy: 1.0000
Epoch 119/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0774 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1626 - val_sparse_categorical_accuracy: 0.9333
Epoch 120/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0901 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.0956 - val_sparse_categorical_accuracy: 1.0000
Epoch 121/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0792 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1204 - val_sparse_categorical_accuracy: 0.9333
Epoch 122/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0772 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1195 - val_sparse_categorical_accuracy: 0.9333
Epoch 123/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0812 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1527 - val_sparse_categorical_accuracy: 0.9333
Epoch 124/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0786 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1039 - val_sparse_categorical_accuracy: 1.0000
Epoch 125/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0761 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1379 - val_sparse_categorical_accuracy: 0.9333
Epoch 126/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0783 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0789 - val_sparse_categorical_accuracy: 1.0000
Epoch 127/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0834 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0953 - val_sparse_categorical_accuracy: 1.0000
Epoch 128/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0793 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1557 - val_sparse_categorical_accuracy: 0.9333
Epoch 129/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0748 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1006 - val_sparse_categorical_accuracy: 1.0000
Epoch 130/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0876 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1741 - val_sparse_categorical_accuracy: 0.9333
Epoch 131/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0762 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1159 - val_sparse_categorical_accuracy: 0.9333
Epoch 132/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0753 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1435 - val_sparse_categorical_accuracy: 0.9333
Epoch 133/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0740 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1083 - val_sparse_categorical_accuracy: 1.0000
Epoch 134/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0742 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1094 - val_sparse_categorical_accuracy: 0.9333
Epoch 135/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0774 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1338 - val_sparse_categorical_accuracy: 0.9333
Epoch 136/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0758 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1250 - val_sparse_categorical_accuracy: 0.9333
Epoch 137/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0723 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1059 - val_sparse_categorical_accuracy: 1.0000
Epoch 138/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0792 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0779 - val_sparse_categorical_accuracy: 1.0000
Epoch 139/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0735 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1091 - val_sparse_categorical_accuracy: 0.9333
Epoch 140/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0782 - sparse_categorical_accuracy: 0.9556 - val_loss: 0.1056 - val_sparse_categorical_accuracy: 0.9333
Epoch 141/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0729 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0911 - val_sparse_categorical_accuracy: 1.0000
Epoch 142/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0730 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0962 - val_sparse_categorical_accuracy: 1.0000
Epoch 143/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0765 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1649 - val_sparse_categorical_accuracy: 0.9333
Epoch 144/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0712 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.1026 - val_sparse_categorical_accuracy: 1.0000
Epoch 145/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0728 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1019 - val_sparse_categorical_accuracy: 1.0000
Epoch 146/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0756 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0823 - val_sparse_categorical_accuracy: 1.0000
Epoch 147/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0743 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1016 - val_sparse_categorical_accuracy: 1.0000
Epoch 148/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0695 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0998 - val_sparse_categorical_accuracy: 1.0000
Epoch 149/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0744 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0778 - val_sparse_categorical_accuracy: 1.0000
Epoch 150/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0739 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0670 - val_sparse_categorical_accuracy: 1.0000
Epoch 151/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0696 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1405 - val_sparse_categorical_accuracy: 0.9333
Epoch 152/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0705 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0965 - val_sparse_categorical_accuracy: 1.0000
Epoch 153/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0749 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0798 - val_sparse_categorical_accuracy: 1.0000
Epoch 154/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0776 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0844 - val_sparse_categorical_accuracy: 1.0000
Epoch 155/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0734 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1153 - val_sparse_categorical_accuracy: 0.9333
Epoch 156/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0794 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0955 - val_sparse_categorical_accuracy: 1.0000
Epoch 157/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0717 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1243 - val_sparse_categorical_accuracy: 0.9333
Epoch 158/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0704 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1145 - val_sparse_categorical_accuracy: 0.9333
Epoch 159/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0745 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1278 - val_sparse_categorical_accuracy: 0.9333
Epoch 160/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0741 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0804 - val_sparse_categorical_accuracy: 1.0000
Epoch 161/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0670 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1042 - val_sparse_categorical_accuracy: 0.9333
Epoch 162/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0694 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1381 - val_sparse_categorical_accuracy: 0.9333
Epoch 163/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0680 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1018 - val_sparse_categorical_accuracy: 0.9333
Epoch 164/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0670 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0962 - val_sparse_categorical_accuracy: 0.9333
Epoch 165/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0724 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1267 - val_sparse_categorical_accuracy: 0.9333
Epoch 166/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0715 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0745 - val_sparse_categorical_accuracy: 1.0000
Epoch 167/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0659 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0993 - val_sparse_categorical_accuracy: 0.9333
Epoch 168/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0674 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0980 - val_sparse_categorical_accuracy: 0.9333
Epoch 169/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0709 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.1234 - val_sparse_categorical_accuracy: 0.9333
Epoch 170/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0706 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0573 - val_sparse_categorical_accuracy: 1.0000
Epoch 171/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0697 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1598 - val_sparse_categorical_accuracy: 0.9333
Epoch 172/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0708 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0803 - val_sparse_categorical_accuracy: 1.0000
Epoch 173/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0687 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1243 - val_sparse_categorical_accuracy: 0.9333
Epoch 174/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0679 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1110 - val_sparse_categorical_accuracy: 0.9333
Epoch 175/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0686 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1254 - val_sparse_categorical_accuracy: 0.9333
Epoch 176/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0675 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0833 - val_sparse_categorical_accuracy: 1.0000
Epoch 177/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0697 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1085 - val_sparse_categorical_accuracy: 0.9333
Epoch 178/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0650 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0836 - val_sparse_categorical_accuracy: 1.0000
Epoch 179/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0662 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0747 - val_sparse_categorical_accuracy: 1.0000
Epoch 180/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0658 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1032 - val_sparse_categorical_accuracy: 0.9333
Epoch 181/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0739 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1356 - val_sparse_categorical_accuracy: 0.9333
Epoch 182/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0752 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0821 - val_sparse_categorical_accuracy: 1.0000
Epoch 183/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0676 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0865 - val_sparse_categorical_accuracy: 1.0000
Epoch 184/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0681 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1285 - val_sparse_categorical_accuracy: 0.9333
Epoch 185/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0707 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1425 - val_sparse_categorical_accuracy: 0.9333
Epoch 186/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0680 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0849 - val_sparse_categorical_accuracy: 1.0000
Epoch 187/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0638 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1067 - val_sparse_categorical_accuracy: 0.9333
Epoch 188/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0647 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0884 - val_sparse_categorical_accuracy: 1.0000
Epoch 189/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0647 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0854 - val_sparse_categorical_accuracy: 1.0000
Epoch 190/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0656 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0650 - val_sparse_categorical_accuracy: 1.0000
Epoch 191/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0627 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1178 - val_sparse_categorical_accuracy: 0.9333
Epoch 192/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0668 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0859 - val_sparse_categorical_accuracy: 1.0000
Epoch 193/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0705 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0968 - val_sparse_categorical_accuracy: 0.9333
Epoch 194/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0618 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0764 - val_sparse_categorical_accuracy: 1.0000
Epoch 195/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0657 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0718 - val_sparse_categorical_accuracy: 1.0000
Epoch 196/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0665 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1003 - val_sparse_categorical_accuracy: 0.9333
Epoch 197/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0639 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1007 - val_sparse_categorical_accuracy: 0.9333
Epoch 198/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0663 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0913 - val_sparse_categorical_accuracy: 0.9333
Epoch 199/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0703 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0732 - val_sparse_categorical_accuracy: 1.0000
Epoch 200/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0657 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1208 - val_sparse_categorical_accuracy: 0.9333
Epoch 201/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0661 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0892 - val_sparse_categorical_accuracy: 0.9333
Epoch 202/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0622 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1069 - val_sparse_categorical_accuracy: 0.9333
Epoch 203/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0697 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0446 - val_sparse_categorical_accuracy: 1.0000
Epoch 204/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0649 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1140 - val_sparse_categorical_accuracy: 0.9333
Epoch 205/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0814 - sparse_categorical_accuracy: 0.9407 - val_loss: 0.0654 - val_sparse_categorical_accuracy: 1.0000
Epoch 206/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0724 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0885 - val_sparse_categorical_accuracy: 0.9333
Epoch 207/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0643 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0674 - val_sparse_categorical_accuracy: 1.0000
Epoch 208/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0614 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0972 - val_sparse_categorical_accuracy: 0.9333
Epoch 209/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0652 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0703 - val_sparse_categorical_accuracy: 1.0000
Epoch 210/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0623 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0944 - val_sparse_categorical_accuracy: 0.9333
Epoch 211/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0639 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1057 - val_sparse_categorical_accuracy: 0.9333
Epoch 212/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0667 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0709 - val_sparse_categorical_accuracy: 1.0000
Epoch 213/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0652 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0777 - val_sparse_categorical_accuracy: 1.0000
Epoch 214/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0650 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0630 - val_sparse_categorical_accuracy: 1.0000
Epoch 215/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0632 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0943 - val_sparse_categorical_accuracy: 0.9333
Epoch 216/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0649 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1154 - val_sparse_categorical_accuracy: 0.9333
Epoch 217/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0675 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1084 - val_sparse_categorical_accuracy: 0.9333
Epoch 218/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0624 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.1055 - val_sparse_categorical_accuracy: 0.9333
Epoch 219/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0678 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0567 - val_sparse_categorical_accuracy: 1.0000
Epoch 220/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0615 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0776 - val_sparse_categorical_accuracy: 1.0000
Epoch 221/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0603 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0838 - val_sparse_categorical_accuracy: 0.9333
Epoch 222/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0605 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0673 - val_sparse_categorical_accuracy: 1.0000
Epoch 223/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0620 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0650 - val_sparse_categorical_accuracy: 1.0000
Epoch 224/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0646 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0811 - val_sparse_categorical_accuracy: 1.0000
Epoch 225/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0612 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0690 - val_sparse_categorical_accuracy: 1.0000
Epoch 226/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0650 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0677 - val_sparse_categorical_accuracy: 1.0000
Epoch 227/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0627 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0766 - val_sparse_categorical_accuracy: 1.0000
Epoch 228/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0610 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0671 - val_sparse_categorical_accuracy: 1.0000
Epoch 229/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0616 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0793 - val_sparse_categorical_accuracy: 1.0000
Epoch 230/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0611 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0769 - val_sparse_categorical_accuracy: 1.0000
Epoch 231/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0615 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0791 - val_sparse_categorical_accuracy: 1.0000
Epoch 232/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0678 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0550 - val_sparse_categorical_accuracy: 1.0000
Epoch 233/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0615 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0795 - val_sparse_categorical_accuracy: 1.0000
Epoch 234/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0614 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0911 - val_sparse_categorical_accuracy: 0.9333
Epoch 235/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0613 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1002 - val_sparse_categorical_accuracy: 0.9333
Epoch 236/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0648 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0779 - val_sparse_categorical_accuracy: 1.0000
Epoch 237/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0594 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0913 - val_sparse_categorical_accuracy: 0.9333
Epoch 238/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0657 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0619 - val_sparse_categorical_accuracy: 1.0000
Epoch 239/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0644 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0999 - val_sparse_categorical_accuracy: 0.9333
Epoch 240/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0620 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0894 - val_sparse_categorical_accuracy: 0.9333
Epoch 241/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0617 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0565 - val_sparse_categorical_accuracy: 1.0000
Epoch 242/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0593 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0967 - val_sparse_categorical_accuracy: 0.9333
Epoch 243/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0597 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0885 - val_sparse_categorical_accuracy: 0.9333
Epoch 244/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0634 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0898 - val_sparse_categorical_accuracy: 0.9333
Epoch 245/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0625 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0853 - val_sparse_categorical_accuracy: 0.9333
Epoch 246/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0612 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0681 - val_sparse_categorical_accuracy: 1.0000
Epoch 247/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0610 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0821 - val_sparse_categorical_accuracy: 0.9333
Epoch 248/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0586 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0767 - val_sparse_categorical_accuracy: 1.0000
Epoch 249/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0624 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0711 - val_sparse_categorical_accuracy: 1.0000
Epoch 250/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0643 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0528 - val_sparse_categorical_accuracy: 1.0000
Epoch 251/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0601 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0794 - val_sparse_categorical_accuracy: 0.9333
Epoch 252/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0598 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0729 - val_sparse_categorical_accuracy: 1.0000
Epoch 253/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0585 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0809 - val_sparse_categorical_accuracy: 0.9333
Epoch 254/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0612 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0945 - val_sparse_categorical_accuracy: 0.9333
Epoch 255/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0578 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0701 - val_sparse_categorical_accuracy: 1.0000
Epoch 256/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0603 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0643 - val_sparse_categorical_accuracy: 1.0000
Epoch 257/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0603 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0687 - val_sparse_categorical_accuracy: 1.0000
Epoch 258/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0609 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0744 - val_sparse_categorical_accuracy: 1.0000
Epoch 259/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0631 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0579 - val_sparse_categorical_accuracy: 1.0000
Epoch 260/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0630 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0561 - val_sparse_categorical_accuracy: 1.0000
Epoch 261/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0600 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0893 - val_sparse_categorical_accuracy: 0.9333
Epoch 262/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0621 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0740 - val_sparse_categorical_accuracy: 1.0000
Epoch 263/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0585 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0848 - val_sparse_categorical_accuracy: 0.9333
Epoch 264/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0627 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0628 - val_sparse_categorical_accuracy: 1.0000
Epoch 265/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0604 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1040 - val_sparse_categorical_accuracy: 0.9333
Epoch 266/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0576 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0756 - val_sparse_categorical_accuracy: 1.0000
Epoch 267/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0610 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0503 - val_sparse_categorical_accuracy: 1.0000
Epoch 268/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0602 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0629 - val_sparse_categorical_accuracy: 1.0000
Epoch 269/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0596 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0694 - val_sparse_categorical_accuracy: 1.0000
Epoch 270/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0601 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0961 - val_sparse_categorical_accuracy: 0.9333
Epoch 271/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0629 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0659 - val_sparse_categorical_accuracy: 1.0000
Epoch 272/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0577 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0936 - val_sparse_categorical_accuracy: 0.9333
Epoch 273/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0601 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0699 - val_sparse_categorical_accuracy: 1.0000
Epoch 274/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0592 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0717 - val_sparse_categorical_accuracy: 1.0000
Epoch 275/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0586 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0610 - val_sparse_categorical_accuracy: 1.0000
Epoch 276/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0584 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0843 - val_sparse_categorical_accuracy: 0.9333
Epoch 277/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0604 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0829 - val_sparse_categorical_accuracy: 0.9333
Epoch 278/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0678 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0736 - val_sparse_categorical_accuracy: 1.0000
Epoch 279/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0659 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0481 - val_sparse_categorical_accuracy: 1.0000
Epoch 280/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0591 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0821 - val_sparse_categorical_accuracy: 0.9333
Epoch 281/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0597 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0831 - val_sparse_categorical_accuracy: 0.9333
Epoch 282/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0616 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0289 - val_sparse_categorical_accuracy: 1.0000
Epoch 283/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0705 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0560 - val_sparse_categorical_accuracy: 1.0000
Epoch 284/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0569 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0686 - val_sparse_categorical_accuracy: 1.0000
Epoch 285/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0625 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0470 - val_sparse_categorical_accuracy: 1.0000
Epoch 286/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0606 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0946 - val_sparse_categorical_accuracy: 0.9333
Epoch 287/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0571 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0710 - val_sparse_categorical_accuracy: 1.0000
Epoch 288/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0591 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0590 - val_sparse_categorical_accuracy: 1.0000
Epoch 289/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0582 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0693 - val_sparse_categorical_accuracy: 1.0000
Epoch 290/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0568 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0778 - val_sparse_categorical_accuracy: 0.9333
Epoch 291/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0578 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0686 - val_sparse_categorical_accuracy: 1.0000
Epoch 292/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0608 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0799 - val_sparse_categorical_accuracy: 0.9333
Epoch 293/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0588 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0522 - val_sparse_categorical_accuracy: 1.0000
Epoch 294/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0600 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0899 - val_sparse_categorical_accuracy: 0.9333
Epoch 295/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0581 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0504 - val_sparse_categorical_accuracy: 1.0000
Epoch 296/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0581 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0842 - val_sparse_categorical_accuracy: 0.9333
Epoch 297/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0743 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.1256 - val_sparse_categorical_accuracy: 0.9333
Epoch 298/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0602 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0808 - val_sparse_categorical_accuracy: 0.9333
Epoch 299/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0586 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0833 - val_sparse_categorical_accuracy: 0.9333
Epoch 300/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0573 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0789 - val_sparse_categorical_accuracy: 0.9333
Epoch 301/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0658 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0298 - val_sparse_categorical_accuracy: 1.0000
Epoch 302/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0600 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0613 - val_sparse_categorical_accuracy: 1.0000
Epoch 303/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0573 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0589 - val_sparse_categorical_accuracy: 1.0000
Epoch 304/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0579 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0644 - val_sparse_categorical_accuracy: 1.0000
Epoch 305/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0566 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0642 - val_sparse_categorical_accuracy: 1.0000
Epoch 306/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0563 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0710 - val_sparse_categorical_accuracy: 1.0000
Epoch 307/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0568 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0889 - val_sparse_categorical_accuracy: 0.9333
Epoch 308/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0607 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0945 - val_sparse_categorical_accuracy: 0.9333
Epoch 309/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0565 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0603 - val_sparse_categorical_accuracy: 1.0000
Epoch 310/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0571 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0606 - val_sparse_categorical_accuracy: 1.0000
Epoch 311/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0610 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0893 - val_sparse_categorical_accuracy: 0.9333
Epoch 312/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0588 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0550 - val_sparse_categorical_accuracy: 1.0000
Epoch 313/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0599 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0591 - val_sparse_categorical_accuracy: 1.0000
Epoch 314/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0562 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0624 - val_sparse_categorical_accuracy: 1.0000
Epoch 315/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0574 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0920 - val_sparse_categorical_accuracy: 0.9333
Epoch 316/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0561 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0523 - val_sparse_categorical_accuracy: 1.0000
Epoch 317/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0598 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0698 - val_sparse_categorical_accuracy: 1.0000
Epoch 318/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0592 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0665 - val_sparse_categorical_accuracy: 1.0000
Epoch 319/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0614 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0754 - val_sparse_categorical_accuracy: 0.9333
Epoch 320/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0618 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0432 - val_sparse_categorical_accuracy: 1.0000
Epoch 321/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0605 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0971 - val_sparse_categorical_accuracy: 0.9333
Epoch 322/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0667 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0508 - val_sparse_categorical_accuracy: 1.0000
Epoch 323/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0581 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0687 - val_sparse_categorical_accuracy: 1.0000
Epoch 324/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0566 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0428 - val_sparse_categorical_accuracy: 1.0000
Epoch 325/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0529 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0869 - val_sparse_categorical_accuracy: 0.9333
Epoch 326/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0570 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0602 - val_sparse_categorical_accuracy: 1.0000
Epoch 327/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0598 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0828 - val_sparse_categorical_accuracy: 0.9333
Epoch 328/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0607 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0315 - val_sparse_categorical_accuracy: 1.0000
Epoch 329/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0577 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0542 - val_sparse_categorical_accuracy: 1.0000
Epoch 330/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0574 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0680 - val_sparse_categorical_accuracy: 1.0000
Epoch 331/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0620 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0750 - val_sparse_categorical_accuracy: 0.9333
Epoch 332/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0552 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0647 - val_sparse_categorical_accuracy: 1.0000
Epoch 333/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0635 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0403 - val_sparse_categorical_accuracy: 1.0000
Epoch 334/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0559 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0681 - val_sparse_categorical_accuracy: 1.0000
Epoch 335/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0576 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0562 - val_sparse_categorical_accuracy: 1.0000
Epoch 336/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0560 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0560 - val_sparse_categorical_accuracy: 1.0000
Epoch 337/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0578 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1006 - val_sparse_categorical_accuracy: 0.9333
Epoch 338/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0541 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0470 - val_sparse_categorical_accuracy: 1.0000
Epoch 339/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0557 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0884 - val_sparse_categorical_accuracy: 0.9333
Epoch 340/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0577 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0560 - val_sparse_categorical_accuracy: 1.0000
Epoch 341/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0548 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0527 - val_sparse_categorical_accuracy: 1.0000
Epoch 342/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0592 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0610 - val_sparse_categorical_accuracy: 1.0000
Epoch 343/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0613 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1053 - val_sparse_categorical_accuracy: 0.9333
Epoch 344/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0581 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0486 - val_sparse_categorical_accuracy: 1.0000
Epoch 345/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0546 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0716 - val_sparse_categorical_accuracy: 0.9333
Epoch 346/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0579 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0490 - val_sparse_categorical_accuracy: 1.0000
Epoch 347/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0597 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0970 - val_sparse_categorical_accuracy: 0.9333
Epoch 348/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0555 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0593 - val_sparse_categorical_accuracy: 1.0000
Epoch 349/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0595 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.1023 - val_sparse_categorical_accuracy: 0.9333
Epoch 350/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0654 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0776 - val_sparse_categorical_accuracy: 0.9333
Epoch 351/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0566 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0646 - val_sparse_categorical_accuracy: 1.0000
Epoch 352/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0608 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0633 - val_sparse_categorical_accuracy: 1.0000
Epoch 353/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0557 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0677 - val_sparse_categorical_accuracy: 1.0000
Epoch 354/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0558 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0583 - val_sparse_categorical_accuracy: 1.0000
Epoch 355/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0549 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0749 - val_sparse_categorical_accuracy: 0.9333
Epoch 356/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0600 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0376 - val_sparse_categorical_accuracy: 1.0000
Epoch 357/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0588 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0573 - val_sparse_categorical_accuracy: 1.0000
Epoch 358/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0551 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0666 - val_sparse_categorical_accuracy: 1.0000
Epoch 359/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0562 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0672 - val_sparse_categorical_accuracy: 1.0000
Epoch 360/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0628 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0682 - val_sparse_categorical_accuracy: 1.0000
Epoch 361/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0542 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0559 - val_sparse_categorical_accuracy: 1.0000
Epoch 362/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0556 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0598 - val_sparse_categorical_accuracy: 1.0000
Epoch 363/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0574 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0459 - val_sparse_categorical_accuracy: 1.0000
Epoch 364/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0625 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0432 - val_sparse_categorical_accuracy: 1.0000
Epoch 365/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0533 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0747 - val_sparse_categorical_accuracy: 0.9333
Epoch 366/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0604 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0637 - val_sparse_categorical_accuracy: 1.0000
Epoch 367/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0545 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0672 - val_sparse_categorical_accuracy: 1.0000
Epoch 368/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0620 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0639 - val_sparse_categorical_accuracy: 1.0000
Epoch 369/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0590 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0568 - val_sparse_categorical_accuracy: 1.0000
Epoch 370/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0666 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0647 - val_sparse_categorical_accuracy: 1.0000
Epoch 371/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0532 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0746 - val_sparse_categorical_accuracy: 0.9333
Epoch 372/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0530 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0599 - val_sparse_categorical_accuracy: 1.0000
Epoch 373/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0594 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0459 - val_sparse_categorical_accuracy: 1.0000
Epoch 374/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0586 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0666 - val_sparse_categorical_accuracy: 1.0000
Epoch 375/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0570 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0798 - val_sparse_categorical_accuracy: 0.9333
Epoch 376/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0556 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0530 - val_sparse_categorical_accuracy: 1.0000
Epoch 377/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0573 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0683 - val_sparse_categorical_accuracy: 0.9333
Epoch 378/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0530 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0636 - val_sparse_categorical_accuracy: 1.0000
Epoch 379/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0627 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0298 - val_sparse_categorical_accuracy: 1.0000
Epoch 380/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0596 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0655 - val_sparse_categorical_accuracy: 1.0000
Epoch 381/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0548 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0534 - val_sparse_categorical_accuracy: 1.0000
Epoch 382/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0543 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0603 - val_sparse_categorical_accuracy: 1.0000
Epoch 383/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0592 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0843 - val_sparse_categorical_accuracy: 0.9333
Epoch 384/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0632 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0582 - val_sparse_categorical_accuracy: 1.0000
Epoch 385/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0594 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0678 - val_sparse_categorical_accuracy: 1.0000
Epoch 386/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0577 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0676 - val_sparse_categorical_accuracy: 1.0000
Epoch 387/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0574 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0762 - val_sparse_categorical_accuracy: 0.9333
Epoch 388/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0536 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0595 - val_sparse_categorical_accuracy: 1.0000
Epoch 389/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0535 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0828 - val_sparse_categorical_accuracy: 0.9333
Epoch 390/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0557 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0661 - val_sparse_categorical_accuracy: 1.0000
Epoch 391/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0549 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0759 - val_sparse_categorical_accuracy: 0.9333
Epoch 392/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0554 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0772 - val_sparse_categorical_accuracy: 0.9333
Epoch 393/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0584 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0822 - val_sparse_categorical_accuracy: 0.9333
Epoch 394/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0584 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0441 - val_sparse_categorical_accuracy: 1.0000
Epoch 395/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0575 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0496 - val_sparse_categorical_accuracy: 1.0000
Epoch 396/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0626 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0695 - val_sparse_categorical_accuracy: 0.9333
Epoch 397/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0599 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0729 - val_sparse_categorical_accuracy: 0.9333
Epoch 398/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0546 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0580 - val_sparse_categorical_accuracy: 1.0000
Epoch 399/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0601 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0416 - val_sparse_categorical_accuracy: 1.0000
Epoch 400/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0545 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0810 - val_sparse_categorical_accuracy: 0.9333
Epoch 401/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0533 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0581 - val_sparse_categorical_accuracy: 1.0000
Epoch 402/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0543 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0703 - val_sparse_categorical_accuracy: 0.9333
Epoch 403/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0562 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0697 - val_sparse_categorical_accuracy: 0.9333
Epoch 404/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0579 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0776 - val_sparse_categorical_accuracy: 0.9333
Epoch 405/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0559 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0761 - val_sparse_categorical_accuracy: 0.9333
Epoch 406/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0584 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0540 - val_sparse_categorical_accuracy: 1.0000
Epoch 407/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0595 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0532 - val_sparse_categorical_accuracy: 1.0000
Epoch 408/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0517 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0417 - val_sparse_categorical_accuracy: 1.0000
Epoch 409/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0560 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0561 - val_sparse_categorical_accuracy: 1.0000
Epoch 410/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0568 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0503 - val_sparse_categorical_accuracy: 1.0000
Epoch 411/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0540 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0452 - val_sparse_categorical_accuracy: 1.0000
Epoch 412/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0571 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0535 - val_sparse_categorical_accuracy: 1.0000
Epoch 413/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0564 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0797 - val_sparse_categorical_accuracy: 0.9333
Epoch 414/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0559 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0683 - val_sparse_categorical_accuracy: 0.9333
Epoch 415/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0564 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0352 - val_sparse_categorical_accuracy: 1.0000
Epoch 416/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0546 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0594 - val_sparse_categorical_accuracy: 1.0000
Epoch 417/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0573 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0715 - val_sparse_categorical_accuracy: 0.9333
Epoch 418/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0542 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0667 - val_sparse_categorical_accuracy: 0.9333
Epoch 419/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0639 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0234 - val_sparse_categorical_accuracy: 1.0000
Epoch 420/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0618 - sparse_categorical_accuracy: 0.9630 - val_loss: 0.0704 - val_sparse_categorical_accuracy: 0.9333
Epoch 421/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0531 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0486 - val_sparse_categorical_accuracy: 1.0000
Epoch 422/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0526 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0441 - val_sparse_categorical_accuracy: 1.0000
Epoch 423/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0556 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0542 - val_sparse_categorical_accuracy: 1.0000
Epoch 424/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0570 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0657 - val_sparse_categorical_accuracy: 1.0000
Epoch 425/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0601 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0487 - val_sparse_categorical_accuracy: 1.0000
Epoch 426/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0563 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0429 - val_sparse_categorical_accuracy: 1.0000
Epoch 427/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0543 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0646 - val_sparse_categorical_accuracy: 1.0000
Epoch 428/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0566 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0736 - val_sparse_categorical_accuracy: 0.9333
Epoch 429/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0571 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0559 - val_sparse_categorical_accuracy: 1.0000
Epoch 430/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0586 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0705 - val_sparse_categorical_accuracy: 0.9333
Epoch 431/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0532 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0493 - val_sparse_categorical_accuracy: 1.0000
Epoch 432/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0560 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0607 - val_sparse_categorical_accuracy: 1.0000
Epoch 433/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0529 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0662 - val_sparse_categorical_accuracy: 0.9333
Epoch 434/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0516 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0546 - val_sparse_categorical_accuracy: 1.0000
Epoch 435/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0540 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0391 - val_sparse_categorical_accuracy: 1.0000
Epoch 436/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0565 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0512 - val_sparse_categorical_accuracy: 1.0000
Epoch 437/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0566 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0682 - val_sparse_categorical_accuracy: 0.9333
Epoch 438/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0546 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0591 - val_sparse_categorical_accuracy: 1.0000
Epoch 439/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0551 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0697 - val_sparse_categorical_accuracy: 0.9333
Epoch 440/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0523 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0581 - val_sparse_categorical_accuracy: 1.0000
Epoch 441/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0546 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0658 - val_sparse_categorical_accuracy: 0.9333
Epoch 442/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0588 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0701 - val_sparse_categorical_accuracy: 0.9333
Epoch 443/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0585 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0908 - val_sparse_categorical_accuracy: 0.9333
Epoch 444/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0568 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0603 - val_sparse_categorical_accuracy: 1.0000
Epoch 445/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0571 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0439 - val_sparse_categorical_accuracy: 1.0000
Epoch 446/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0563 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0433 - val_sparse_categorical_accuracy: 1.0000
Epoch 447/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0595 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0645 - val_sparse_categorical_accuracy: 1.0000
Epoch 448/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0527 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0714 - val_sparse_categorical_accuracy: 0.9333
Epoch 449/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0534 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0537 - val_sparse_categorical_accuracy: 1.0000
Epoch 450/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0537 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0531 - val_sparse_categorical_accuracy: 1.0000
Epoch 451/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0512 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0449 - val_sparse_categorical_accuracy: 1.0000
Epoch 452/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0534 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0704 - val_sparse_categorical_accuracy: 0.9333
Epoch 453/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0524 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0669 - val_sparse_categorical_accuracy: 0.9333
Epoch 454/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0552 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0468 - val_sparse_categorical_accuracy: 1.0000
Epoch 455/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0554 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0579 - val_sparse_categorical_accuracy: 1.0000
Epoch 456/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0528 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0611 - val_sparse_categorical_accuracy: 1.0000
Epoch 457/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0549 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0434 - val_sparse_categorical_accuracy: 1.0000
Epoch 458/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0499 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0837 - val_sparse_categorical_accuracy: 0.9333
Epoch 459/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0541 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0516 - val_sparse_categorical_accuracy: 1.0000
Epoch 460/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0524 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0613 - val_sparse_categorical_accuracy: 1.0000
Epoch 461/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0560 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0542 - val_sparse_categorical_accuracy: 1.0000
Epoch 462/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0526 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0610 - val_sparse_categorical_accuracy: 1.0000
Epoch 463/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0536 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0678 - val_sparse_categorical_accuracy: 0.9333
Epoch 464/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0570 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0851 - val_sparse_categorical_accuracy: 0.9333
Epoch 465/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0545 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0390 - val_sparse_categorical_accuracy: 1.0000
Epoch 466/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0603 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0570 - val_sparse_categorical_accuracy: 1.0000
Epoch 467/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0598 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0569 - val_sparse_categorical_accuracy: 1.0000
Epoch 468/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0547 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0615 - val_sparse_categorical_accuracy: 1.0000
Epoch 469/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0516 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0401 - val_sparse_categorical_accuracy: 1.0000
Epoch 470/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0593 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0797 - val_sparse_categorical_accuracy: 0.9333
Epoch 471/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0625 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0721 - val_sparse_categorical_accuracy: 0.9333
Epoch 472/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0538 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0728 - val_sparse_categorical_accuracy: 0.9333
Epoch 473/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0537 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0455 - val_sparse_categorical_accuracy: 1.0000
Epoch 474/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0572 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0530 - val_sparse_categorical_accuracy: 1.0000
Epoch 475/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0513 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0467 - val_sparse_categorical_accuracy: 1.0000
Epoch 476/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0535 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0568 - val_sparse_categorical_accuracy: 1.0000
Epoch 477/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0550 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0578 - val_sparse_categorical_accuracy: 1.0000
Epoch 478/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0529 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0496 - val_sparse_categorical_accuracy: 1.0000
Epoch 479/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0513 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0482 - val_sparse_categorical_accuracy: 1.0000
Epoch 480/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0544 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0521 - val_sparse_categorical_accuracy: 1.0000
Epoch 481/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0536 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0618 - val_sparse_categorical_accuracy: 1.0000
Epoch 482/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0540 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0720 - val_sparse_categorical_accuracy: 0.9333
Epoch 483/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0585 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0493 - val_sparse_categorical_accuracy: 1.0000
Epoch 484/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0637 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0327 - val_sparse_categorical_accuracy: 1.0000
Epoch 485/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0616 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0855 - val_sparse_categorical_accuracy: 0.9333
Epoch 486/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0536 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0556 - val_sparse_categorical_accuracy: 1.0000
Epoch 487/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0541 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0433 - val_sparse_categorical_accuracy: 1.0000
Epoch 488/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0606 - sparse_categorical_accuracy: 0.9704 - val_loss: 0.0542 - val_sparse_categorical_accuracy: 1.0000
Epoch 489/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0541 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0521 - val_sparse_categorical_accuracy: 1.0000
Epoch 490/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0561 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0774 - val_sparse_categorical_accuracy: 0.9333
Epoch 491/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0528 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0570 - val_sparse_categorical_accuracy: 1.0000
Epoch 492/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0526 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0697 - val_sparse_categorical_accuracy: 0.9333
Epoch 493/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0567 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0430 - val_sparse_categorical_accuracy: 1.0000
Epoch 494/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0529 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0566 - val_sparse_categorical_accuracy: 1.0000
Epoch 495/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0531 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0388 - val_sparse_categorical_accuracy: 1.0000
Epoch 496/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0552 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0387 - val_sparse_categorical_accuracy: 1.0000
Epoch 497/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0594 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0413 - val_sparse_categorical_accuracy: 1.0000
Epoch 498/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0555 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0748 - val_sparse_categorical_accuracy: 0.9333
Epoch 499/500
34/34 [==============================] - 0s 1ms/step - loss: 0.0531 - sparse_categorical_accuracy: 0.9778 - val_loss: 0.0426 - val_sparse_categorical_accuracy: 1.0000
Epoch 500/500
34/34 [==============================] - 0s 2ms/step - loss: 0.0520 - sparse_categorical_accuracy: 0.9852 - val_loss: 0.0713 - val_sparse_categorical_accuracy: 0.9333

模型的保存与读取

保存整个模型

1
model1.save('model.h5')

保存模型参数

1
model1.save_weights('model_weight.h5')

读取整个模型

1
from tensorflow.keras.models import load_model
1
upload_model = load_model('model.h5')
1
upload_model.summary()
Model: "sequential_4"
_________________________________________________________________
 Layer (type)                Output Shape              Param #   
=================================================================
 dense_49 (Dense)            (None, 5)                 25        

 dense_50 (Dense)            (None, 6)                 36        

 dense_51 (Dense)            (None, 3)                 21        

=================================================================
Total params: 82
Trainable params: 82
Non-trainable params: 0
_________________________________________________________________

加载模型参数

1
2
# 将模型参数加载到model1中
model1.load_weights('model_weight.h5')

模型的可视化

模型训练过程可视化|

1
history.history.keys()
dict_keys(['loss', 'sparse_categorical_accuracy', 'val_loss', 'val_sparse_categorical_accuracy'])
1
import matplotlib.pyplot as plt
1
2
3
4
plt.plot(range(len(history.history['loss'])), history.history['loss'])
plt.plot(range(len(history.history['val_loss'])), history.history['val_loss'])
plt.legend(['loss', 'val_loss'])
plt.show()

output_160_0_202303092122

1
2
3
4
plt.plot(range(len(history.history['sparse_categorical_accuracy'])), history.history['sparse_categorical_accuracy'])
plt.plot(range(len(history.history['val_sparse_categorical_accuracy'])), history.history['val_sparse_categorical_accuracy'])
plt.legend(['sparse_categorical_accuracy', 'val_sparse_categorical_accuracy'])
plt.show()

output_161_0_202303092122

可视化整个模型

1
from tensorflow.keras.utils import plot_model
1
plot_model(upload_model, show_shapes=True, dpi=200, )

output_164_0_202303092122

使用高阶API进一步简化一元线性回归模型

1
2
import tensorflow as tf
import numpy as np
1
2
3
# skiprows: 表示要丢弃的行数
# delimiter: 分隔符
data = np.loadtxt('line_fit_data.csv', skiprows=1, delimiter=',')
1
2
3
# 分离特征和标签
x_data = tf.constant(data[:, 0], dtype=tf.float32)
y_data = tf.constant(data[:, 1], dtype=tf.float32)
1
2
3
# 定义模型
model = tf.keras.Sequential()
model.add(tf.keras.layers.Dense(1, input_shape=(1, )))
1
model.summary()
Model: "sequential"
_________________________________________________________________
 Layer (type)                Output Shape              Param #   
=================================================================
 dense (Dense)               (None, 1)                 2         

=================================================================
Total params: 2
Trainable params: 2
Non-trainable params: 0
_________________________________________________________________
1
model.compile(optimizer=tf.keras.optimizers.Adam(learning_rate=0.5), metrics='mse', loss='mse')
1
model.fit(x_data, y_data, epochs=100)
Epoch 1/100
4/4 [==============================] - 0s 2ms/step - loss: 14.4788 - mse: 14.4788
Epoch 2/100
4/4 [==============================] - 0s 1ms/step - loss: 1.2346 - mse: 1.2346
Epoch 3/100
4/4 [==============================] - 0s 2ms/step - loss: 1.3457 - mse: 1.3457
Epoch 4/100
4/4 [==============================] - 0s 2ms/step - loss: 2.7909 - mse: 2.7909
Epoch 5/100
4/4 [==============================] - 0s 2ms/step - loss: 1.0991 - mse: 1.0991
Epoch 6/100
4/4 [==============================] - 0s 2ms/step - loss: 0.0893 - mse: 0.0893
Epoch 7/100
4/4 [==============================] - 0s 2ms/step - loss: 0.6154 - mse: 0.6154
Epoch 8/100
4/4 [==============================] - 0s 1ms/step - loss: 0.6001 - mse: 0.6001
Epoch 9/100
4/4 [==============================] - 0s 2ms/step - loss: 0.1097 - mse: 0.1097
Epoch 10/100
4/4 [==============================] - 0s 1ms/step - loss: 0.0665 - mse: 0.0665
Epoch 11/100
4/4 [==============================] - 0s 2ms/step - loss: 0.1870 - mse: 0.1870
Epoch 12/100
4/4 [==============================] - 0s 2ms/step - loss: 0.0759 - mse: 0.0759
Epoch 13/100
4/4 [==============================] - 0s 1ms/step - loss: 0.0087 - mse: 0.0087
Epoch 14/100
4/4 [==============================] - 0s 2ms/step - loss: 0.0503 - mse: 0.0503
Epoch 15/100
4/4 [==============================] - 0s 1ms/step - loss: 0.0299 - mse: 0.0299
Epoch 16/100
4/4 [==============================] - 0s 2ms/step - loss: 0.0015 - mse: 0.0015
Epoch 17/100
4/4 [==============================] - 0s 2ms/step - loss: 0.0134 - mse: 0.0134
Epoch 18/100
4/4 [==============================] - 0s 1ms/step - loss: 0.0098 - mse: 0.0098
Epoch 19/100
4/4 [==============================] - 0s 1ms/step - loss: 4.7637e-04 - mse: 4.7637e-04
Epoch 20/100
4/4 [==============================] - 0s 2ms/step - loss: 0.0035 - mse: 0.0035
Epoch 21/100
4/4 [==============================] - 0s 2ms/step - loss: 0.0022 - mse: 0.0022
Epoch 22/100
4/4 [==============================] - 0s 2ms/step - loss: 1.8088e-04 - mse: 1.8088e-04
Epoch 23/100
4/4 [==============================] - 0s 2ms/step - loss: 0.0012 - mse: 0.0012
Epoch 24/100
4/4 [==============================] - 0s 1ms/step - loss: 3.8759e-04 - mse: 3.8759e-04
Epoch 25/100
4/4 [==============================] - 0s 2ms/step - loss: 1.2438e-04 - mse: 1.2438e-04
Epoch 26/100
4/4 [==============================] - 0s 2ms/step - loss: 3.9408e-04 - mse: 3.9408e-04
Epoch 27/100
4/4 [==============================] - 0s 1ms/step - loss: 5.6677e-05 - mse: 5.6677e-05
Epoch 28/100
4/4 [==============================] - 0s 1ms/step - loss: 9.9738e-05 - mse: 9.9738e-05
Epoch 29/100
4/4 [==============================] - 0s 997us/step - loss: 1.0118e-04 - mse: 1.0118e-04
Epoch 30/100
4/4 [==============================] - 0s 1ms/step - loss: 7.2110e-06 - mse: 7.2110e-06
Epoch 31/100
4/4 [==============================] - 0s 1ms/step - loss: 4.6129e-05 - mse: 4.6129e-05
Epoch 32/100
4/4 [==============================] - 0s 1ms/step - loss: 1.3055e-05 - mse: 1.3055e-05
Epoch 33/100
4/4 [==============================] - 0s 2ms/step - loss: 7.3340e-06 - mse: 7.3340e-06
Epoch 34/100
4/4 [==============================] - 0s 2ms/step - loss: 1.3375e-05 - mse: 1.3375e-05
Epoch 35/100
4/4 [==============================] - 0s 2ms/step - loss: 8.1410e-07 - mse: 8.1410e-07
Epoch 36/100
4/4 [==============================] - 0s 2ms/step - loss: 5.8634e-06 - mse: 5.8634e-06
Epoch 37/100
4/4 [==============================] - 0s 1ms/step - loss: 1.8811e-06 - mse: 1.8811e-06
Epoch 38/100
4/4 [==============================] - 0s 1ms/step - loss: 1.4155e-06 - mse: 1.4155e-06
Epoch 39/100
4/4 [==============================] - 0s 2ms/step - loss: 1.9133e-06 - mse: 1.9133e-06
Epoch 40/100
4/4 [==============================] - 0s 1ms/step - loss: 1.5096e-07 - mse: 1.5096e-07
Epoch 41/100
4/4 [==============================] - 0s 996us/step - loss: 9.0395e-07 - mse: 9.0395e-07
Epoch 42/100
4/4 [==============================] - 0s 1ms/step - loss: 1.5146e-07 - mse: 1.5146e-07
Epoch 43/100
4/4 [==============================] - 0s 1ms/step - loss: 2.6045e-07 - mse: 2.6045e-07
Epoch 44/100
4/4 [==============================] - 0s 1ms/step - loss: 1.4262e-07 - mse: 1.4262e-07
Epoch 45/100
4/4 [==============================] - 0s 1ms/step - loss: 4.9561e-08 - mse: 4.9561e-08
Epoch 46/100
4/4 [==============================] - 0s 1ms/step - loss: 9.2213e-08 - mse: 9.2213e-08
Epoch 47/100
4/4 [==============================] - 0s 996us/step - loss: 6.3543e-09 - mse: 6.3543e-09
Epoch 48/100
4/4 [==============================] - 0s 1ms/step - loss: 4.0042e-08 - mse: 4.0042e-08
Epoch 49/100
4/4 [==============================] - 0s 1ms/step - loss: 4.7420e-09 - mse: 4.7420e-09
Epoch 50/100
4/4 [==============================] - 0s 1ms/step - loss: 1.4763e-08 - mse: 1.4763e-08
Epoch 51/100
4/4 [==============================] - 0s 996us/step - loss: 5.0760e-09 - mse: 5.0760e-09
Epoch 52/100
4/4 [==============================] - 0s 1ms/step - loss: 4.9090e-09 - mse: 4.9090e-09
Epoch 53/100
4/4 [==============================] - 0s 2ms/step - loss: 3.5267e-09 - mse: 3.5267e-09
Epoch 54/100
4/4 [==============================] - 0s 1ms/step - loss: 1.1435e-09 - mse: 1.1435e-09
Epoch 55/100
4/4 [==============================] - 0s 997us/step - loss: 1.9827e-09 - mse: 1.9827e-09
Epoch 56/100
4/4 [==============================] - 0s 1ms/step - loss: 2.3066e-10 - mse: 2.3066e-10
Epoch 57/100
4/4 [==============================] - 0s 997us/step - loss: 8.8188e-10 - mse: 8.8188e-10
Epoch 58/100
4/4 [==============================] - 0s 1ms/step - loss: 7.9779e-11 - mse: 7.9779e-11
Epoch 59/100
4/4 [==============================] - 0s 999us/step - loss: 3.7345e-10 - mse: 3.7345e-10
Epoch 60/100
4/4 [==============================] - 0s 1ms/step - loss: 4.2683e-11 - mse: 4.2683e-11
Epoch 61/100
4/4 [==============================] - 0s 1ms/step - loss: 1.5108e-10 - mse: 1.5108e-10
Epoch 62/100
4/4 [==============================] - 0s 1ms/step - loss: 2.4193e-11 - mse: 2.4193e-11
Epoch 63/100
4/4 [==============================] - 0s 1ms/step - loss: 5.0300e-11 - mse: 5.0300e-11
Epoch 64/100
4/4 [==============================] - 0s 1ms/step - loss: 1.3879e-11 - mse: 1.3879e-11
Epoch 65/100
4/4 [==============================] - 0s 1ms/step - loss: 2.2469e-11 - mse: 2.2469e-11
Epoch 66/100
4/4 [==============================] - 0s 2ms/step - loss: 7.7807e-12 - mse: 7.7807e-12
Epoch 67/100
4/4 [==============================] - 0s 1ms/step - loss: 1.0655e-11 - mse: 1.0655e-11
Epoch 68/100
4/4 [==============================] - 0s 1ms/step - loss: 3.8017e-12 - mse: 3.8017e-12
Epoch 69/100
4/4 [==============================] - 0s 1ms/step - loss: 3.8676e-12 - mse: 3.8676e-12
Epoch 70/100
4/4 [==============================] - 0s 2ms/step - loss: 1.2460e-12 - mse: 1.2460e-12
Epoch 71/100
4/4 [==============================] - 0s 1ms/step - loss: 1.0505e-12 - mse: 1.0505e-12
Epoch 72/100
4/4 [==============================] - 0s 2ms/step - loss: 4.7748e-13 - mse: 4.7748e-13
Epoch 73/100
4/4 [==============================] - 0s 2ms/step - loss: 7.0486e-14 - mse: 7.0486e-14
Epoch 74/100
4/4 [==============================] - 0s 2ms/step - loss: 1.6826e-13 - mse: 1.6826e-13
Epoch 75/100
4/4 [==============================] - 0s 2ms/step - loss: 1.0232e-13 - mse: 1.0232e-13
Epoch 76/100
4/4 [==============================] - 0s 2ms/step - loss: 5.0022e-14 - mse: 5.0022e-14
Epoch 77/100
4/4 [==============================] - 0s 2ms/step - loss: 5.0022e-14 - mse: 5.0022e-14
Epoch 78/100
4/4 [==============================] - 0s 1ms/step - loss: 5.0022e-14 - mse: 5.0022e-14
Epoch 79/100
4/4 [==============================] - 0s 1ms/step - loss: 5.0022e-14 - mse: 5.0022e-14
Epoch 80/100
4/4 [==============================] - 0s 1ms/step - loss: 5.0022e-14 - mse: 5.0022e-14
Epoch 81/100
4/4 [==============================] - 0s 1ms/step - loss: 5.0022e-14 - mse: 5.0022e-14
Epoch 82/100
4/4 [==============================] - 0s 1ms/step - loss: 5.0022e-14 - mse: 5.0022e-14
Epoch 83/100
4/4 [==============================] - 0s 1ms/step - loss: 5.0022e-14 - mse: 5.0022e-14
Epoch 84/100
4/4 [==============================] - 0s 1ms/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 85/100
4/4 [==============================] - 0s 1ms/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 86/100
4/4 [==============================] - 0s 2ms/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 87/100
4/4 [==============================] - 0s 1ms/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 88/100
4/4 [==============================] - 0s 1ms/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 89/100
4/4 [==============================] - 0s 997us/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 90/100
4/4 [==============================] - 0s 1ms/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 91/100
4/4 [==============================] - 0s 1ms/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 92/100
4/4 [==============================] - 0s 996us/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 93/100
4/4 [==============================] - 0s 1ms/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 94/100
4/4 [==============================] - 0s 996us/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 95/100
4/4 [==============================] - 0s 997us/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 96/100
4/4 [==============================] - 0s 2ms/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 97/100
4/4 [==============================] - 0s 1ms/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 98/100
4/4 [==============================] - 0s 997us/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 99/100
4/4 [==============================] - 0s 1ms/step - loss: 1.8190e-14 - mse: 1.8190e-14
Epoch 100/100
4/4 [==============================] - 0s 1ms/step - loss: 1.8190e-14 - mse: 1.8190e-14





<keras.callbacks.History at 0x2198de15df0>
1
model.weights
[<tf.Variable 'dense/kernel:0' shape=(1, 1) dtype=float32, numpy=array([[2.5]], dtype=float32)>,
 <tf.Variable 'dense/bias:0' shape=(1,) dtype=float32, numpy=array([4.], dtype=float32)>]
-------------本文结束感谢您的阅读-------------