Cainvas
Model Files
model.h5
keras
Model
deepSea Compiled Models
model.exe
deepSea
Ubuntu

Inventory Management using Deep Learning

Credit: AITS Cainvas Community

Photo by Rachit Tank on Dribbble

In [1]:
!wget -N "https://cainvas-static.s3.amazonaws.com/media/user_data/cainvas-admin/data_week1.zip"
!unzip -qo data_week1.zip 
!rm data_week1.zip
--2021-07-22 11:47:44--  https://cainvas-static.s3.amazonaws.com/media/user_data/cainvas-admin/data_week1.zip
Resolving cainvas-static.s3.amazonaws.com (cainvas-static.s3.amazonaws.com)... 52.219.64.112
Connecting to cainvas-static.s3.amazonaws.com (cainvas-static.s3.amazonaws.com)|52.219.64.112|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 101230622 (97M) [application/x-zip-compressed]
Saving to: ‘data_week1.zip’

data_week1.zip      100%[===================>]  96.54M  98.8MB/s    in 1.0s    

2021-07-22 11:47:45 (98.8 MB/s) - ‘data_week1.zip’ saved [101230622/101230622]

Installing prerequisites

In [2]:
!pip3 install imgaug
Defaulting to user installation because normal site-packages is not writeable
Collecting imgaug
  Downloading imgaug-0.4.0-py2.py3-none-any.whl (948 kB)
     |████████████████████████████████| 948 kB 2.6 MB/s eta 0:00:01
Requirement already satisfied: Pillow in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (8.0.1)
Requirement already satisfied: matplotlib in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (3.3.3)
Requirement already satisfied: scipy in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (1.4.1)
Requirement already satisfied: scikit-image>=0.14.2 in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (0.17.2)
Requirement already satisfied: opencv-python in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (4.4.0.46)
Requirement already satisfied: numpy>=1.15 in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (1.18.5)
Requirement already satisfied: six in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (1.15.0)
Requirement already satisfied: imageio in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (2.9.0)
Requirement already satisfied: Pillow in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (8.0.1)
Requirement already satisfied: numpy>=1.15 in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (1.18.5)
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/tljh/user/lib/python3.7/site-packages (from matplotlib->imgaug) (1.3.1)
Requirement already satisfied: Pillow in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (8.0.1)
Requirement already satisfied: numpy>=1.15 in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (1.18.5)
Requirement already satisfied: cycler>=0.10 in /opt/tljh/user/lib/python3.7/site-packages (from matplotlib->imgaug) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /opt/tljh/user/lib/python3.7/site-packages (from matplotlib->imgaug) (2.4.7)
Requirement already satisfied: python-dateutil>=2.1 in /opt/tljh/user/lib/python3.7/site-packages (from matplotlib->imgaug) (2.8.1)
Requirement already satisfied: six in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (1.15.0)
Requirement already satisfied: numpy>=1.15 in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (1.18.5)
Requirement already satisfied: six in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (1.15.0)
Requirement already satisfied: Pillow in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (8.0.1)
Requirement already satisfied: matplotlib in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (3.3.3)
Requirement already satisfied: numpy>=1.15 in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (1.18.5)
Requirement already satisfied: tifffile>=2019.7.26 in /opt/tljh/user/lib/python3.7/site-packages (from scikit-image>=0.14.2->imgaug) (2020.12.8)
Requirement already satisfied: imageio in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (2.9.0)
Requirement already satisfied: PyWavelets>=1.1.1 in /opt/tljh/user/lib/python3.7/site-packages (from scikit-image>=0.14.2->imgaug) (1.1.1)
Requirement already satisfied: networkx>=2.0 in /opt/tljh/user/lib/python3.7/site-packages (from scikit-image>=0.14.2->imgaug) (2.5)
Requirement already satisfied: scipy in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (1.4.1)
Requirement already satisfied: decorator>=4.3.0 in /opt/tljh/user/lib/python3.7/site-packages (from networkx>=2.0->scikit-image>=0.14.2->imgaug) (4.4.2)
Requirement already satisfied: numpy>=1.15 in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (1.18.5)
Requirement already satisfied: numpy>=1.15 in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (1.18.5)
Collecting Shapely
  Downloading Shapely-1.7.1-cp37-cp37m-manylinux1_x86_64.whl (1.0 MB)
     |████████████████████████████████| 1.0 MB 2.7 MB/s eta 0:00:01
Requirement already satisfied: numpy>=1.15 in /opt/tljh/user/lib/python3.7/site-packages (from imgaug) (1.18.5)
Installing collected packages: Shapely, imgaug
Successfully installed Shapely-1.7.1 imgaug-0.4.0
WARNING: You are using pip version 20.3.1; however, version 21.1.3 is available.
You should consider upgrading via the '/opt/tljh/user/bin/python -m pip install --upgrade pip' command.
In [3]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import os, random, cv2, pickle, json, itertools
import imgaug.augmenters as iaa
import imgaug.imgaug
import tensorflow as tf

from IPython.display import SVG
from tensorflow.keras.utils import plot_model, model_to_dot
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix
from collections import Counter
from sklearn.utils import class_weight
from tqdm import tqdm
from sklearn.preprocessing import LabelBinarizer

from tensorflow.keras.utils import to_categorical
from tensorflow.keras.callbacks import TensorBoard, ModelCheckpoint, Callback, EarlyStopping
from tensorflow.keras.models import Sequential, Model
from tensorflow.keras.layers import (Add, Input, Conv2D, Dropout, Activation, BatchNormalization, MaxPool2D, ZeroPadding2D, AveragePooling2D, Flatten, Dense)
from tensorflow.keras.optimizers import Adam, SGD
from tensorflow.keras.callbacks import TensorBoard, ModelCheckpoint, Callback, EarlyStopping
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.initializers import *

Function to plot model metrics

In [4]:
def show_final_history(history):
    
    plt.style.use("ggplot")
    fig, ax = plt.subplots(1,2,figsize=(15,5))
    ax[0].set_title('Loss')
    ax[1].set_title('Accuracy')
    ax[0].plot(history.history['loss'],label='Train Loss')
    ax[0].plot(history.history['val_loss'],label='Validation Loss')
    ax[1].plot(history.history['accuracy'],label='Train Accuracy')
    ax[1].plot(history.history['val_accuracy'],label='Validation Accuracy')
    
    ax[0].legend(loc='upper right')
    ax[1].legend(loc='lower right')
    plt.show();
    pass

Identifying the dataset and classes

In [5]:
datasets = ['data_week1/images']

class_names = ["MILK","NUTS","OIL","SODA","TEA"]

class_name_labels = {class_name:i for i,class_name in enumerate(class_names)}

num_classes = len(class_names)
class_name_labels
Out[5]:
{'MILK': 0, 'NUTS': 1, 'OIL': 2, 'SODA': 3, 'TEA': 4}

Loading the data

In [6]:
def load_data():
    images, labels = [], []
    
    for dataset in datasets:
        
        for folder in os.listdir(dataset):
            label = class_name_labels[folder]
            
            for file in tqdm(os.listdir(os.path.join(dataset,folder))):
                
                img_path = os.path.join(dataset,folder,file)
                
                img = cv2.imread(img_path)
                img = cv2.resize(img, (96,96))
                
                images.append(img)
                labels.append(label)
                pass
            pass
        
        images = np.array(images,dtype=np.float32)/255.0
        labels = np.array(labels,dtype=np.float32)
        pass
    
    return (images, labels)
    pass
In [7]:
(images, labels) = load_data()
images.shape, labels.shape
100%|██████████| 168/168 [00:00<00:00, 421.18it/s]
100%|██████████| 177/177 [00:00<00:00, 361.60it/s]
100%|██████████| 162/162 [00:00<00:00, 362.25it/s]
100%|██████████| 283/283 [00:00<00:00, 357.66it/s]
100%|██████████| 143/143 [00:00<00:00, 374.29it/s]
Out[7]:
((933, 96, 96, 3), (933,))

Checking our classes

In [8]:
n_labels = labels.shape[0]

_, count = np.unique(labels, return_counts=True)

df = pd.DataFrame(data = count)
df['Class Label'] = class_names
df.columns = ['Count','Class-Label']
df.set_index('Class-Label',inplace=True)
df
Out[8]:
Count
Class-Label
MILK 162
NUTS 168
OIL 143
SODA 177
TEA 283

Augmenting images to prevent underfitting and remove bias in the dataset

In [9]:
def augment_add(images, seq, labels):
    
    augmented_images, augmented_labels = [],[]
    for idx,img in tqdm(enumerate(images)):
        
        if labels[idx] == 1:
            image_aug_1 = seq.augment_image(image=img)
            image_aug_2 = seq.augment_image(image=img)
            augmented_images.append(image_aug_1)
            augmented_images.append(image_aug_2)
            augmented_labels.append(labels[idx])
            augmented_labels.append(labels[idx])
        pass
    
    augmented_images = np.array(augmented_images, dtype=np.float32)
    augmented_labels = np.array(augmented_labels, dtype=np.float32)
    
    return (augmented_images, augmented_labels)
    pass
In [10]:
seq = iaa.Sequential([
    iaa.Fliplr(0.5),
    iaa.Crop(percent=(0,0.1)),
    iaa.LinearContrast((0.75,1.5)),
    iaa.Multiply((0.8,1.2), per_channel=0.2),
    iaa.Affine(
        scale={'x':(0.8,1.2), "y":(0.8,1.2)},
        translate_percent={"x":(-0.2,0.2),"y":(-0.2,0.2)},
        rotate=(-25,25),
        shear=(-8,8)
    )
], random_order=True)
In [11]:
(aug_images, aug_labels) = augment_add(images, seq, labels)
images = np.concatenate([images, aug_images])
labels = np.concatenate([labels, aug_labels])
933it [00:00, 1373.76it/s]
In [12]:
images.shape, labels.shape
Out[12]:
((1269, 96, 96, 3), (1269,))
In [13]:
labels = to_categorical(labels)

Dividing images into train,validation and test sets

In [14]:
np.random.seed(42)
np.random.shuffle(images)

np.random.seed(42)
np.random.shuffle(labels)
In [15]:
total_count = len(images)
total_count

train = int(0.7*total_count)
val = int(0.2*total_count)
test = int(0.1*total_count)

train_images, train_labels = images[:train], labels[:train]
val_images, val_labels = images[train:(val+train)], labels[train:(val+train)]
test_images, test_labels = images[-test:], labels[-test:]

train_images.shape, val_images.shape, test_images.shape
Out[15]:
((888, 96, 96, 3), (253, 96, 96, 3), (126, 96, 96, 3))

Defining model architecture

In [16]:
model = Sequential([
    Input(shape=(96,96,3)),
    ZeroPadding2D((5,5)),
    Conv2D(32, 3, activation='relu'),
    BatchNormalization(),
    MaxPool2D(pool_size=(2,2)),
    Dropout(0.3),
    Conv2D(32, 3, activation='relu'),
    MaxPool2D(pool_size=(2,2)),
    Dropout(0.3),
    Conv2D(32, 3, activation='relu'),
    MaxPool2D(pool_size=(2,2)),
    Dropout(0.4),
    Conv2D(32, 3, activation='relu'),
    MaxPool2D(pool_size=(2,2)),
    Dropout(0.3),
    Conv2D(32, 3, activation='relu'),
    MaxPool2D(pool_size=(2,2)),
    Dropout(0.3),
    Flatten(),
    Dense(64, activation='relu'),
    Dropout(0.5),
    Dense(5, activation='softmax')
])

model.summary()
Model: "sequential"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
zero_padding2d (ZeroPadding2 (None, 106, 106, 3)       0         
_________________________________________________________________
conv2d (Conv2D)              (None, 104, 104, 32)      896       
_________________________________________________________________
batch_normalization (BatchNo (None, 104, 104, 32)      128       
_________________________________________________________________
max_pooling2d (MaxPooling2D) (None, 52, 52, 32)        0         
_________________________________________________________________
dropout (Dropout)            (None, 52, 52, 32)        0         
_________________________________________________________________
conv2d_1 (Conv2D)            (None, 50, 50, 32)        9248      
_________________________________________________________________
max_pooling2d_1 (MaxPooling2 (None, 25, 25, 32)        0         
_________________________________________________________________
dropout_1 (Dropout)          (None, 25, 25, 32)        0         
_________________________________________________________________
conv2d_2 (Conv2D)            (None, 23, 23, 32)        9248      
_________________________________________________________________
max_pooling2d_2 (MaxPooling2 (None, 11, 11, 32)        0         
_________________________________________________________________
dropout_2 (Dropout)          (None, 11, 11, 32)        0         
_________________________________________________________________
conv2d_3 (Conv2D)            (None, 9, 9, 32)          9248      
_________________________________________________________________
max_pooling2d_3 (MaxPooling2 (None, 4, 4, 32)          0         
_________________________________________________________________
dropout_3 (Dropout)          (None, 4, 4, 32)          0         
_________________________________________________________________
conv2d_4 (Conv2D)            (None, 2, 2, 32)          9248      
_________________________________________________________________
max_pooling2d_4 (MaxPooling2 (None, 1, 1, 32)          0         
_________________________________________________________________
dropout_4 (Dropout)          (None, 1, 1, 32)          0         
_________________________________________________________________
flatten (Flatten)            (None, 32)                0         
_________________________________________________________________
dense (Dense)                (None, 64)                2112      
_________________________________________________________________
dropout_5 (Dropout)          (None, 64)                0         
_________________________________________________________________
dense_1 (Dense)              (None, 5)                 325       
=================================================================
Total params: 40,453
Trainable params: 40,389
Non-trainable params: 64
_________________________________________________________________

Defining model callbacks and compiling the model with the Adam optimizer

In [17]:
checkpoint = ModelCheckpoint(
    './base.model',
    monitor='val_accuracy',
    verbose=1,
    save_best_only=True,
    mode='max',
    save_weights_only=False,
    save_frequency=1
)
earlystop = EarlyStopping(
    monitor='val_loss',
    min_delta=0.001,
    patience=50,
    verbose=1,
    mode='auto'
)

opt = Adam(lr=1e-3)

callbacks = [checkpoint,earlystop]

model.compile(optimizer=opt,loss='binary_crossentropy',metrics=['accuracy'])
In [18]:
epochs = 200
batch_size = 32

history = model.fit(train_images,train_labels,
                    batch_size=batch_size,
                   steps_per_epoch=len(train_images)//batch_size,
                   epochs=epochs,
                   verbose=1, 
                   validation_data=(val_images,val_labels),
                   validation_steps=len(val_images)//batch_size,
                   callbacks=callbacks
                   )
Epoch 1/200
27/27 [==============================] - ETA: 0s - loss: 0.5531 - accuracy: 0.2616
Epoch 00001: val_accuracy improved from -inf to 0.44196, saving model to ./base.model
WARNING:tensorflow:From /opt/tljh/user/lib/python3.7/site-packages/tensorflow/python/training/tracking/tracking.py:111: Model.state_updates (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.
Instructions for updating:
This property should not be used in TensorFlow 2.0, as updates are applied automatically.
WARNING:tensorflow:From /opt/tljh/user/lib/python3.7/site-packages/tensorflow/python/training/tracking/tracking.py:111: Layer.updates (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.
Instructions for updating:
This property should not be used in TensorFlow 2.0, as updates are applied automatically.
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 79ms/step - loss: 0.5531 - accuracy: 0.2616 - val_loss: 0.4949 - val_accuracy: 0.4420
Epoch 2/200
26/27 [===========================>..] - ETA: 0s - loss: 0.4850 - accuracy: 0.3556
Epoch 00002: val_accuracy did not improve from 0.44196
27/27 [==============================] - 0s 12ms/step - loss: 0.4829 - accuracy: 0.3621 - val_loss: 0.4910 - val_accuracy: 0.4420
Epoch 3/200
25/27 [==========================>...] - ETA: 0s - loss: 0.4833 - accuracy: 0.3472
Epoch 00003: val_accuracy did not improve from 0.44196
27/27 [==============================] - 0s 11ms/step - loss: 0.4837 - accuracy: 0.3470 - val_loss: 0.4887 - val_accuracy: 0.4420
Epoch 4/200
25/27 [==========================>...] - ETA: 0s - loss: 0.4715 - accuracy: 0.3712
Epoch 00004: val_accuracy did not improve from 0.44196
27/27 [==============================] - 0s 11ms/step - loss: 0.4710 - accuracy: 0.3750 - val_loss: 0.4856 - val_accuracy: 0.4420
Epoch 5/200
25/27 [==========================>...] - ETA: 0s - loss: 0.4626 - accuracy: 0.3725
Epoch 00005: val_accuracy did not improve from 0.44196
27/27 [==============================] - 0s 11ms/step - loss: 0.4633 - accuracy: 0.3750 - val_loss: 0.4850 - val_accuracy: 0.4420
Epoch 6/200
25/27 [==========================>...] - ETA: 0s - loss: 0.4550 - accuracy: 0.3838
Epoch 00006: val_accuracy did not improve from 0.44196
27/27 [==============================] - 0s 11ms/step - loss: 0.4562 - accuracy: 0.3762 - val_loss: 0.4854 - val_accuracy: 0.4420
Epoch 7/200
25/27 [==========================>...] - ETA: 0s - loss: 0.4365 - accuracy: 0.3939
Epoch 00007: val_accuracy did not improve from 0.44196
27/27 [==============================] - 0s 11ms/step - loss: 0.4356 - accuracy: 0.3937 - val_loss: 0.4762 - val_accuracy: 0.4420
Epoch 8/200
25/27 [==========================>...] - ETA: 0s - loss: 0.4259 - accuracy: 0.3788
Epoch 00008: val_accuracy improved from 0.44196 to 0.46875, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 66ms/step - loss: 0.4277 - accuracy: 0.3727 - val_loss: 0.4826 - val_accuracy: 0.4688
Epoch 9/200
25/27 [==========================>...] - ETA: 0s - loss: 0.4168 - accuracy: 0.3788
Epoch 00009: val_accuracy did not improve from 0.46875
27/27 [==============================] - 0s 11ms/step - loss: 0.4150 - accuracy: 0.3797 - val_loss: 0.4769 - val_accuracy: 0.3795
Epoch 10/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3998 - accuracy: 0.4205
Epoch 00010: val_accuracy did not improve from 0.46875
27/27 [==============================] - 0s 11ms/step - loss: 0.3984 - accuracy: 0.4217 - val_loss: 0.4805 - val_accuracy: 0.3304
Epoch 11/200
25/27 [==========================>...] - ETA: 0s - loss: 0.4010 - accuracy: 0.4104
Epoch 00011: val_accuracy did not improve from 0.46875
27/27 [==============================] - 0s 11ms/step - loss: 0.4009 - accuracy: 0.4042 - val_loss: 0.4794 - val_accuracy: 0.3304
Epoch 12/200
25/27 [==========================>...] - ETA: 0s - loss: 0.4005 - accuracy: 0.4230
Epoch 00012: val_accuracy did not improve from 0.46875
27/27 [==============================] - 0s 11ms/step - loss: 0.3971 - accuracy: 0.4276 - val_loss: 0.4586 - val_accuracy: 0.3795
Epoch 13/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3760 - accuracy: 0.4798
Epoch 00013: val_accuracy did not improve from 0.46875
27/27 [==============================] - 0s 11ms/step - loss: 0.3786 - accuracy: 0.4766 - val_loss: 0.4302 - val_accuracy: 0.4062
Epoch 14/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3855 - accuracy: 0.4735
Epoch 00014: val_accuracy did not improve from 0.46875
27/27 [==============================] - 0s 11ms/step - loss: 0.3811 - accuracy: 0.4813 - val_loss: 0.4244 - val_accuracy: 0.4018
Epoch 15/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3886 - accuracy: 0.4937
Epoch 00015: val_accuracy did not improve from 0.46875
27/27 [==============================] - 0s 11ms/step - loss: 0.3871 - accuracy: 0.4953 - val_loss: 0.4414 - val_accuracy: 0.3795
Epoch 16/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3683 - accuracy: 0.5215
Epoch 00016: val_accuracy did not improve from 0.46875
27/27 [==============================] - 0s 11ms/step - loss: 0.3694 - accuracy: 0.5152 - val_loss: 0.4103 - val_accuracy: 0.4464
Epoch 17/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3687 - accuracy: 0.5101
Epoch 00017: val_accuracy did not improve from 0.46875
27/27 [==============================] - 0s 11ms/step - loss: 0.3668 - accuracy: 0.5082 - val_loss: 0.4320 - val_accuracy: 0.4018
Epoch 18/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3725 - accuracy: 0.5051
Epoch 00018: val_accuracy improved from 0.46875 to 0.48661, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 71ms/step - loss: 0.3713 - accuracy: 0.5058 - val_loss: 0.3923 - val_accuracy: 0.4866
Epoch 19/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3609 - accuracy: 0.5189
Epoch 00019: val_accuracy improved from 0.48661 to 0.51786, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 66ms/step - loss: 0.3579 - accuracy: 0.5245 - val_loss: 0.3703 - val_accuracy: 0.5179
Epoch 20/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3511 - accuracy: 0.5556
Epoch 00020: val_accuracy did not improve from 0.51786
27/27 [==============================] - 0s 11ms/step - loss: 0.3501 - accuracy: 0.5572 - val_loss: 0.3753 - val_accuracy: 0.4911
Epoch 21/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3511 - accuracy: 0.5379
Epoch 00021: val_accuracy did not improve from 0.51786
27/27 [==============================] - 0s 11ms/step - loss: 0.3525 - accuracy: 0.5397 - val_loss: 0.3618 - val_accuracy: 0.5179
Epoch 22/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3531 - accuracy: 0.5328
Epoch 00022: val_accuracy did not improve from 0.51786
27/27 [==============================] - 0s 11ms/step - loss: 0.3559 - accuracy: 0.5269 - val_loss: 0.3619 - val_accuracy: 0.4821
Epoch 23/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3538 - accuracy: 0.5556
Epoch 00023: val_accuracy improved from 0.51786 to 0.57589, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 71ms/step - loss: 0.3528 - accuracy: 0.5584 - val_loss: 0.3548 - val_accuracy: 0.5759
Epoch 24/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3442 - accuracy: 0.5543
Epoch 00024: val_accuracy did not improve from 0.57589
27/27 [==============================] - 0s 11ms/step - loss: 0.3535 - accuracy: 0.5467 - val_loss: 0.3397 - val_accuracy: 0.5402
Epoch 25/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3363 - accuracy: 0.5745
Epoch 00025: val_accuracy improved from 0.57589 to 0.59821, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 70ms/step - loss: 0.3358 - accuracy: 0.5736 - val_loss: 0.3384 - val_accuracy: 0.5982
Epoch 26/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3387 - accuracy: 0.5619
Epoch 00026: val_accuracy did not improve from 0.59821
27/27 [==============================] - 0s 11ms/step - loss: 0.3370 - accuracy: 0.5631 - val_loss: 0.3236 - val_accuracy: 0.5848
Epoch 27/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3242 - accuracy: 0.5788
Epoch 00027: val_accuracy did not improve from 0.59821
27/27 [==============================] - 0s 11ms/step - loss: 0.3227 - accuracy: 0.5806 - val_loss: 0.3198 - val_accuracy: 0.5670
Epoch 28/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3263 - accuracy: 0.5738
Epoch 00028: val_accuracy improved from 0.59821 to 0.61161, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 65ms/step - loss: 0.3267 - accuracy: 0.5759 - val_loss: 0.3449 - val_accuracy: 0.6116
Epoch 29/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3215 - accuracy: 0.5950
Epoch 00029: val_accuracy improved from 0.61161 to 0.63393, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 71ms/step - loss: 0.3178 - accuracy: 0.6019 - val_loss: 0.3168 - val_accuracy: 0.6339
Epoch 30/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3277 - accuracy: 0.5896
Epoch 00030: val_accuracy did not improve from 0.63393
27/27 [==============================] - 0s 11ms/step - loss: 0.3263 - accuracy: 0.5911 - val_loss: 0.3270 - val_accuracy: 0.5491
Epoch 31/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3172 - accuracy: 0.6124
Epoch 00031: val_accuracy did not improve from 0.63393
27/27 [==============================] - 0s 11ms/step - loss: 0.3169 - accuracy: 0.6098 - val_loss: 0.2950 - val_accuracy: 0.6339
Epoch 32/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3031 - accuracy: 0.6237
Epoch 00032: val_accuracy did not improve from 0.63393
27/27 [==============================] - 0s 11ms/step - loss: 0.3011 - accuracy: 0.6320 - val_loss: 0.3230 - val_accuracy: 0.5938
Epoch 33/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3231 - accuracy: 0.6162
Epoch 00033: val_accuracy did not improve from 0.63393
27/27 [==============================] - 0s 11ms/step - loss: 0.3235 - accuracy: 0.6157 - val_loss: 0.3429 - val_accuracy: 0.5089
Epoch 34/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3211 - accuracy: 0.6136
Epoch 00034: val_accuracy did not improve from 0.63393
27/27 [==============================] - 0s 11ms/step - loss: 0.3245 - accuracy: 0.6098 - val_loss: 0.3344 - val_accuracy: 0.5670
Epoch 35/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3057 - accuracy: 0.6225
Epoch 00035: val_accuracy did not improve from 0.63393
27/27 [==============================] - 0s 11ms/step - loss: 0.3011 - accuracy: 0.6262 - val_loss: 0.3208 - val_accuracy: 0.5938
Epoch 36/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2876 - accuracy: 0.6452
Epoch 00036: val_accuracy did not improve from 0.63393
27/27 [==============================] - 0s 11ms/step - loss: 0.2926 - accuracy: 0.6425 - val_loss: 0.3156 - val_accuracy: 0.6205
Epoch 37/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2958 - accuracy: 0.6629
Epoch 00037: val_accuracy improved from 0.63393 to 0.64286, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 65ms/step - loss: 0.2972 - accuracy: 0.6589 - val_loss: 0.3012 - val_accuracy: 0.6429
Epoch 38/200
25/27 [==========================>...] - ETA: 0s - loss: 0.3066 - accuracy: 0.6187
Epoch 00038: val_accuracy did not improve from 0.64286
27/27 [==============================] - 0s 11ms/step - loss: 0.3078 - accuracy: 0.6168 - val_loss: 0.3086 - val_accuracy: 0.6295
Epoch 39/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2938 - accuracy: 0.6503
Epoch 00039: val_accuracy improved from 0.64286 to 0.64732, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 71ms/step - loss: 0.2975 - accuracy: 0.6437 - val_loss: 0.2885 - val_accuracy: 0.6473
Epoch 40/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2774 - accuracy: 0.6566
Epoch 00040: val_accuracy improved from 0.64732 to 0.68750, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 66ms/step - loss: 0.2775 - accuracy: 0.6577 - val_loss: 0.2862 - val_accuracy: 0.6875
Epoch 41/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2866 - accuracy: 0.6452
Epoch 00041: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2822 - accuracy: 0.6542 - val_loss: 0.2859 - val_accuracy: 0.6562
Epoch 42/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2832 - accuracy: 0.6528
Epoch 00042: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2850 - accuracy: 0.6530 - val_loss: 0.2833 - val_accuracy: 0.6518
Epoch 43/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2928 - accuracy: 0.6427
Epoch 00043: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2911 - accuracy: 0.6437 - val_loss: 0.2907 - val_accuracy: 0.6339
Epoch 44/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2910 - accuracy: 0.6351
Epoch 00044: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2908 - accuracy: 0.6320 - val_loss: 0.2805 - val_accuracy: 0.6607
Epoch 45/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2747 - accuracy: 0.6679
Epoch 00045: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2770 - accuracy: 0.6624 - val_loss: 0.3218 - val_accuracy: 0.5670
Epoch 46/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2875 - accuracy: 0.6528
Epoch 00046: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2862 - accuracy: 0.6589 - val_loss: 0.3065 - val_accuracy: 0.6071
Epoch 47/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2892 - accuracy: 0.6439
Epoch 00047: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2890 - accuracy: 0.6460 - val_loss: 0.2970 - val_accuracy: 0.6205
Epoch 48/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2550 - accuracy: 0.7033
Epoch 00048: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2573 - accuracy: 0.6963 - val_loss: 0.2866 - val_accuracy: 0.6295
Epoch 49/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2750 - accuracy: 0.6692
Epoch 00049: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2719 - accuracy: 0.6741 - val_loss: 0.2938 - val_accuracy: 0.6295
Epoch 50/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2677 - accuracy: 0.6604
Epoch 00050: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2678 - accuracy: 0.6589 - val_loss: 0.2840 - val_accuracy: 0.6562
Epoch 51/200
24/27 [=========================>....] - ETA: 0s - loss: 0.2504 - accuracy: 0.7184
Epoch 00051: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2507 - accuracy: 0.7114 - val_loss: 0.2886 - val_accuracy: 0.6429
Epoch 52/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2659 - accuracy: 0.6919
Epoch 00052: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2608 - accuracy: 0.7009 - val_loss: 0.2751 - val_accuracy: 0.6696
Epoch 53/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2434 - accuracy: 0.7235
Epoch 00053: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2417 - accuracy: 0.7290 - val_loss: 0.2844 - val_accuracy: 0.6384
Epoch 54/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2560 - accuracy: 0.7121
Epoch 00054: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2556 - accuracy: 0.7103 - val_loss: 0.2733 - val_accuracy: 0.6607
Epoch 55/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2580 - accuracy: 0.7025
Epoch 00055: val_accuracy did not improve from 0.68750
27/27 [==============================] - 0s 11ms/step - loss: 0.2567 - accuracy: 0.6986 - val_loss: 0.2854 - val_accuracy: 0.6875
Epoch 56/200
25/27 [==========================>...] - ETA: 0s - loss: 0.2528 - accuracy: 0.7075
Epoch 00056: val_accuracy improved from 0.68750 to 0.69643, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 74ms/step - loss: 0.2497 - accuracy: 0.7091 - val_loss: 0.2679 - val_accuracy: 0.6964
Epoch 57/200
27/27 [==============================] - ETA: 0s - loss: 0.2480 - accuracy: 0.7049
Epoch 00057: val_accuracy improved from 0.69643 to 0.71429, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 67ms/step - loss: 0.2480 - accuracy: 0.7049 - val_loss: 0.2576 - val_accuracy: 0.7143
Epoch 58/200
26/27 [===========================>..] - ETA: 0s - loss: 0.2278 - accuracy: 0.7282
Epoch 00058: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 11ms/step - loss: 0.2271 - accuracy: 0.7278 - val_loss: 0.2658 - val_accuracy: 0.6562
Epoch 59/200
27/27 [==============================] - ETA: 0s - loss: 0.2297 - accuracy: 0.7430
Epoch 00059: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 11ms/step - loss: 0.2297 - accuracy: 0.7430 - val_loss: 0.2571 - val_accuracy: 0.6830
Epoch 60/200
27/27 [==============================] - ETA: 0s - loss: 0.2593 - accuracy: 0.6998
Epoch 00060: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 11ms/step - loss: 0.2593 - accuracy: 0.6998 - val_loss: 0.2595 - val_accuracy: 0.6964
Epoch 61/200
22/27 [=======================>......] - ETA: 0s - loss: 0.2217 - accuracy: 0.7529
Epoch 00061: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 11ms/step - loss: 0.2279 - accuracy: 0.7488 - val_loss: 0.3609 - val_accuracy: 0.4911
Epoch 62/200
26/27 [===========================>..] - ETA: 0s - loss: 0.2706 - accuracy: 0.7087
Epoch 00062: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2661 - accuracy: 0.7138 - val_loss: 0.2987 - val_accuracy: 0.6429
Epoch 63/200
27/27 [==============================] - ETA: 0s - loss: 0.2250 - accuracy: 0.7442
Epoch 00063: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2250 - accuracy: 0.7442 - val_loss: 0.2766 - val_accuracy: 0.6652
Epoch 64/200
26/27 [===========================>..] - ETA: 0s - loss: 0.2053 - accuracy: 0.7816
Epoch 00064: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2065 - accuracy: 0.7804 - val_loss: 0.2627 - val_accuracy: 0.7009
Epoch 65/200
27/27 [==============================] - ETA: 0s - loss: 0.2277 - accuracy: 0.7500
Epoch 00065: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2277 - accuracy: 0.7500 - val_loss: 0.2525 - val_accuracy: 0.6920
Epoch 66/200
27/27 [==============================] - ETA: 0s - loss: 0.2500 - accuracy: 0.6998
Epoch 00066: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2500 - accuracy: 0.6998 - val_loss: 0.2942 - val_accuracy: 0.6384
Epoch 67/200
26/27 [===========================>..] - ETA: 0s - loss: 0.2241 - accuracy: 0.7488
Epoch 00067: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2247 - accuracy: 0.7477 - val_loss: 0.3040 - val_accuracy: 0.6473
Epoch 68/200
27/27 [==============================] - ETA: 0s - loss: 0.2272 - accuracy: 0.7500
Epoch 00068: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2272 - accuracy: 0.7500 - val_loss: 0.2518 - val_accuracy: 0.7098
Epoch 69/200
27/27 [==============================] - ETA: 0s - loss: 0.2285 - accuracy: 0.7570
Epoch 00069: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2285 - accuracy: 0.7570 - val_loss: 0.2503 - val_accuracy: 0.6830
Epoch 70/200
27/27 [==============================] - ETA: 0s - loss: 0.2126 - accuracy: 0.7442
Epoch 00070: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2126 - accuracy: 0.7442 - val_loss: 0.2649 - val_accuracy: 0.6964
Epoch 71/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1971 - accuracy: 0.7779
Epoch 00071: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2012 - accuracy: 0.7734 - val_loss: 0.2424 - val_accuracy: 0.7054
Epoch 72/200
27/27 [==============================] - ETA: 0s - loss: 0.1969 - accuracy: 0.7909
Epoch 00072: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.1969 - accuracy: 0.7909 - val_loss: 0.2546 - val_accuracy: 0.7143
Epoch 73/200
26/27 [===========================>..] - ETA: 0s - loss: 0.2117 - accuracy: 0.7816
Epoch 00073: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2159 - accuracy: 0.7792 - val_loss: 0.2513 - val_accuracy: 0.7143
Epoch 74/200
27/27 [==============================] - ETA: 0s - loss: 0.2115 - accuracy: 0.7605
Epoch 00074: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2115 - accuracy: 0.7605 - val_loss: 0.2788 - val_accuracy: 0.6384
Epoch 75/200
26/27 [===========================>..] - ETA: 0s - loss: 0.2310 - accuracy: 0.7427
Epoch 00075: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2295 - accuracy: 0.7477 - val_loss: 0.2649 - val_accuracy: 0.6964
Epoch 76/200
26/27 [===========================>..] - ETA: 0s - loss: 0.2033 - accuracy: 0.7694
Epoch 00076: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2002 - accuracy: 0.7745 - val_loss: 0.2507 - val_accuracy: 0.7054
Epoch 77/200
27/27 [==============================] - ETA: 0s - loss: 0.2070 - accuracy: 0.7652
Epoch 00077: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2070 - accuracy: 0.7652 - val_loss: 0.2421 - val_accuracy: 0.7143
Epoch 78/200
27/27 [==============================] - ETA: 0s - loss: 0.2120 - accuracy: 0.7710
Epoch 00078: val_accuracy did not improve from 0.71429
27/27 [==============================] - 0s 12ms/step - loss: 0.2120 - accuracy: 0.7710 - val_loss: 0.2661 - val_accuracy: 0.6875
Epoch 79/200
27/27 [==============================] - ETA: 0s - loss: 0.1968 - accuracy: 0.7886
Epoch 00079: val_accuracy improved from 0.71429 to 0.73214, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 79ms/step - loss: 0.1968 - accuracy: 0.7886 - val_loss: 0.2318 - val_accuracy: 0.7321
Epoch 80/200
24/27 [=========================>....] - ETA: 0s - loss: 0.2126 - accuracy: 0.7697
Epoch 00080: val_accuracy did not improve from 0.73214
27/27 [==============================] - 0s 13ms/step - loss: 0.2077 - accuracy: 0.7769 - val_loss: 0.2388 - val_accuracy: 0.7098
Epoch 81/200
23/27 [========================>.....] - ETA: 0s - loss: 0.1897 - accuracy: 0.7880
Epoch 00081: val_accuracy improved from 0.73214 to 0.73661, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 72ms/step - loss: 0.1802 - accuracy: 0.8026 - val_loss: 0.2250 - val_accuracy: 0.7366
Epoch 82/200
26/27 [===========================>..] - ETA: 0s - loss: 0.2057 - accuracy: 0.7755
Epoch 00082: val_accuracy did not improve from 0.73661
27/27 [==============================] - 0s 12ms/step - loss: 0.2023 - accuracy: 0.7792 - val_loss: 0.2553 - val_accuracy: 0.6875
Epoch 83/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1832 - accuracy: 0.7949
Epoch 00083: val_accuracy did not improve from 0.73661
27/27 [==============================] - 0s 12ms/step - loss: 0.1821 - accuracy: 0.7944 - val_loss: 0.2402 - val_accuracy: 0.7366
Epoch 84/200
27/27 [==============================] - ETA: 0s - loss: 0.1956 - accuracy: 0.7850
Epoch 00084: val_accuracy did not improve from 0.73661
27/27 [==============================] - 0s 12ms/step - loss: 0.1956 - accuracy: 0.7850 - val_loss: 0.2479 - val_accuracy: 0.7321
Epoch 85/200
27/27 [==============================] - ETA: 0s - loss: 0.1950 - accuracy: 0.7870
Epoch 00085: val_accuracy did not improve from 0.73661
27/27 [==============================] - 0s 12ms/step - loss: 0.1950 - accuracy: 0.7870 - val_loss: 0.2446 - val_accuracy: 0.7321
Epoch 86/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1881 - accuracy: 0.7791
Epoch 00086: val_accuracy did not improve from 0.73661
27/27 [==============================] - 0s 12ms/step - loss: 0.1872 - accuracy: 0.7815 - val_loss: 0.2404 - val_accuracy: 0.7366
Epoch 87/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1867 - accuracy: 0.7900
Epoch 00087: val_accuracy did not improve from 0.73661
27/27 [==============================] - 0s 12ms/step - loss: 0.1888 - accuracy: 0.7804 - val_loss: 0.2373 - val_accuracy: 0.7321
Epoch 88/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1935 - accuracy: 0.7876
Epoch 00088: val_accuracy did not improve from 0.73661
27/27 [==============================] - 0s 12ms/step - loss: 0.1925 - accuracy: 0.7897 - val_loss: 0.2232 - val_accuracy: 0.7188
Epoch 89/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1751 - accuracy: 0.8070
Epoch 00089: val_accuracy did not improve from 0.73661
27/27 [==============================] - 0s 12ms/step - loss: 0.1742 - accuracy: 0.8096 - val_loss: 0.2480 - val_accuracy: 0.7366
Epoch 90/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1733 - accuracy: 0.8095
Epoch 00090: val_accuracy did not improve from 0.73661
27/27 [==============================] - 0s 12ms/step - loss: 0.1706 - accuracy: 0.8154 - val_loss: 0.2194 - val_accuracy: 0.7277
Epoch 91/200
27/27 [==============================] - ETA: 0s - loss: 0.1714 - accuracy: 0.8178
Epoch 00091: val_accuracy improved from 0.73661 to 0.75893, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 78ms/step - loss: 0.1714 - accuracy: 0.8178 - val_loss: 0.2129 - val_accuracy: 0.7589
Epoch 92/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1665 - accuracy: 0.8228
Epoch 00092: val_accuracy did not improve from 0.75893
27/27 [==============================] - 0s 12ms/step - loss: 0.1694 - accuracy: 0.8189 - val_loss: 0.2242 - val_accuracy: 0.7545
Epoch 93/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1719 - accuracy: 0.8034
Epoch 00093: val_accuracy improved from 0.75893 to 0.76786, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 72ms/step - loss: 0.1720 - accuracy: 0.8037 - val_loss: 0.2319 - val_accuracy: 0.7679
Epoch 94/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1872 - accuracy: 0.8143
Epoch 00094: val_accuracy did not improve from 0.76786
27/27 [==============================] - 0s 12ms/step - loss: 0.1859 - accuracy: 0.8143 - val_loss: 0.2514 - val_accuracy: 0.7188
Epoch 95/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1593 - accuracy: 0.8289
Epoch 00095: val_accuracy did not improve from 0.76786
27/27 [==============================] - 0s 12ms/step - loss: 0.1587 - accuracy: 0.8294 - val_loss: 0.2316 - val_accuracy: 0.7545
Epoch 96/200
27/27 [==============================] - ETA: 0s - loss: 0.1835 - accuracy: 0.8014
Epoch 00096: val_accuracy did not improve from 0.76786
27/27 [==============================] - 0s 11ms/step - loss: 0.1835 - accuracy: 0.8014 - val_loss: 0.2311 - val_accuracy: 0.7589
Epoch 97/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1764 - accuracy: 0.8058
Epoch 00097: val_accuracy improved from 0.76786 to 0.77232, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 79ms/step - loss: 0.1794 - accuracy: 0.8014 - val_loss: 0.2234 - val_accuracy: 0.7723
Epoch 98/200
24/27 [=========================>....] - ETA: 0s - loss: 0.1578 - accuracy: 0.8329
Epoch 00098: val_accuracy did not improve from 0.77232
27/27 [==============================] - 0s 13ms/step - loss: 0.1544 - accuracy: 0.8376 - val_loss: 0.2435 - val_accuracy: 0.7723
Epoch 99/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1721 - accuracy: 0.8228
Epoch 00099: val_accuracy did not improve from 0.77232
27/27 [==============================] - 0s 12ms/step - loss: 0.1710 - accuracy: 0.8236 - val_loss: 0.2463 - val_accuracy: 0.7143
Epoch 100/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1784 - accuracy: 0.8204
Epoch 00100: val_accuracy did not improve from 0.77232
27/27 [==============================] - 0s 11ms/step - loss: 0.1797 - accuracy: 0.8201 - val_loss: 0.2419 - val_accuracy: 0.7321
Epoch 101/200
27/27 [==============================] - ETA: 0s - loss: 0.1746 - accuracy: 0.8119
Epoch 00101: val_accuracy did not improve from 0.77232
27/27 [==============================] - 0s 12ms/step - loss: 0.1746 - accuracy: 0.8119 - val_loss: 0.2944 - val_accuracy: 0.6964
Epoch 102/200
27/27 [==============================] - ETA: 0s - loss: 0.1724 - accuracy: 0.8131
Epoch 00102: val_accuracy did not improve from 0.77232
27/27 [==============================] - 0s 12ms/step - loss: 0.1724 - accuracy: 0.8131 - val_loss: 0.2228 - val_accuracy: 0.7723
Epoch 103/200
27/27 [==============================] - ETA: 0s - loss: 0.1569 - accuracy: 0.8236
Epoch 00103: val_accuracy improved from 0.77232 to 0.79018, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 78ms/step - loss: 0.1569 - accuracy: 0.8236 - val_loss: 0.2082 - val_accuracy: 0.7902
Epoch 104/200
27/27 [==============================] - ETA: 0s - loss: 0.1725 - accuracy: 0.8107
Epoch 00104: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1725 - accuracy: 0.8107 - val_loss: 0.2259 - val_accuracy: 0.7411
Epoch 105/200
27/27 [==============================] - ETA: 0s - loss: 0.1849 - accuracy: 0.7909
Epoch 00105: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1849 - accuracy: 0.7909 - val_loss: 0.2509 - val_accuracy: 0.7188
Epoch 106/200
27/27 [==============================] - ETA: 0s - loss: 0.1506 - accuracy: 0.8283
Epoch 00106: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1506 - accuracy: 0.8283 - val_loss: 0.2180 - val_accuracy: 0.7634
Epoch 107/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1646 - accuracy: 0.8386
Epoch 00107: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1685 - accuracy: 0.8364 - val_loss: 0.2192 - val_accuracy: 0.7634
Epoch 108/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1565 - accuracy: 0.8277
Epoch 00108: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1560 - accuracy: 0.8283 - val_loss: 0.2133 - val_accuracy: 0.7545
Epoch 109/200
22/27 [=======================>......] - ETA: 0s - loss: 0.1370 - accuracy: 0.8509
Epoch 00109: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 11ms/step - loss: 0.1313 - accuracy: 0.8575 - val_loss: 0.2175 - val_accuracy: 0.7589
Epoch 110/200
25/27 [==========================>...] - ETA: 0s - loss: 0.1531 - accuracy: 0.8396
Epoch 00110: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 11ms/step - loss: 0.1574 - accuracy: 0.8306 - val_loss: 0.2421 - val_accuracy: 0.7188
Epoch 111/200
27/27 [==============================] - ETA: 0s - loss: 0.1406 - accuracy: 0.8423
Epoch 00111: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1406 - accuracy: 0.8423 - val_loss: 0.2267 - val_accuracy: 0.7500
Epoch 112/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1486 - accuracy: 0.8281
Epoch 00112: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1484 - accuracy: 0.8271 - val_loss: 0.2272 - val_accuracy: 0.7277
Epoch 113/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1512 - accuracy: 0.8425
Epoch 00113: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1492 - accuracy: 0.8461 - val_loss: 0.2305 - val_accuracy: 0.7545
Epoch 114/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1427 - accuracy: 0.8434
Epoch 00114: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1435 - accuracy: 0.8411 - val_loss: 0.2230 - val_accuracy: 0.7679
Epoch 115/200
27/27 [==============================] - ETA: 0s - loss: 0.1603 - accuracy: 0.8446
Epoch 00115: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1603 - accuracy: 0.8446 - val_loss: 0.2377 - val_accuracy: 0.7277
Epoch 116/200
23/27 [========================>.....] - ETA: 0s - loss: 0.1443 - accuracy: 0.8475
Epoch 00116: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1449 - accuracy: 0.8446 - val_loss: 0.4019 - val_accuracy: 0.6339
Epoch 117/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1475 - accuracy: 0.8398
Epoch 00117: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1452 - accuracy: 0.8446 - val_loss: 0.2619 - val_accuracy: 0.7143
Epoch 118/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1564 - accuracy: 0.8495
Epoch 00118: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1552 - accuracy: 0.8470 - val_loss: 0.3354 - val_accuracy: 0.7009
Epoch 119/200
27/27 [==============================] - ETA: 0s - loss: 0.1627 - accuracy: 0.8283
Epoch 00119: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1627 - accuracy: 0.8283 - val_loss: 0.2108 - val_accuracy: 0.7812
Epoch 120/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1438 - accuracy: 0.8532
Epoch 00120: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1424 - accuracy: 0.8540 - val_loss: 0.2890 - val_accuracy: 0.6964
Epoch 121/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1405 - accuracy: 0.8362
Epoch 00121: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1406 - accuracy: 0.8388 - val_loss: 0.2871 - val_accuracy: 0.7188
Epoch 122/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1591 - accuracy: 0.8434
Epoch 00122: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1586 - accuracy: 0.8423 - val_loss: 0.2039 - val_accuracy: 0.7768
Epoch 123/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1270 - accuracy: 0.8580
Epoch 00123: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1290 - accuracy: 0.8575 - val_loss: 0.2119 - val_accuracy: 0.7723
Epoch 124/200
27/27 [==============================] - ETA: 0s - loss: 0.1526 - accuracy: 0.8423
Epoch 00124: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1526 - accuracy: 0.8423 - val_loss: 0.2043 - val_accuracy: 0.7768
Epoch 125/200
27/27 [==============================] - ETA: 0s - loss: 0.1482 - accuracy: 0.8516
Epoch 00125: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1482 - accuracy: 0.8516 - val_loss: 0.2156 - val_accuracy: 0.7902
Epoch 126/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1400 - accuracy: 0.8398
Epoch 00126: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1432 - accuracy: 0.8388 - val_loss: 0.2272 - val_accuracy: 0.7768
Epoch 127/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1445 - accuracy: 0.8422
Epoch 00127: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1425 - accuracy: 0.8446 - val_loss: 0.2034 - val_accuracy: 0.7857
Epoch 128/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1341 - accuracy: 0.8604
Epoch 00128: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1353 - accuracy: 0.8586 - val_loss: 0.2001 - val_accuracy: 0.7902
Epoch 129/200
27/27 [==============================] - ETA: 0s - loss: 0.1197 - accuracy: 0.8773
Epoch 00129: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1197 - accuracy: 0.8773 - val_loss: 0.2133 - val_accuracy: 0.7411
Epoch 130/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1346 - accuracy: 0.8629
Epoch 00130: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1339 - accuracy: 0.8633 - val_loss: 0.2061 - val_accuracy: 0.7812
Epoch 131/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1253 - accuracy: 0.8629
Epoch 00131: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1254 - accuracy: 0.8633 - val_loss: 0.1934 - val_accuracy: 0.7812
Epoch 132/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1190 - accuracy: 0.8811
Epoch 00132: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1204 - accuracy: 0.8785 - val_loss: 0.2171 - val_accuracy: 0.7411
Epoch 133/200
27/27 [==============================] - ETA: 0s - loss: 0.1375 - accuracy: 0.8633
Epoch 00133: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1375 - accuracy: 0.8633 - val_loss: 0.2172 - val_accuracy: 0.7455
Epoch 134/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1348 - accuracy: 0.8604
Epoch 00134: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1379 - accuracy: 0.8598 - val_loss: 0.2111 - val_accuracy: 0.7857
Epoch 135/200
23/27 [========================>.....] - ETA: 0s - loss: 0.1119 - accuracy: 0.8901
Epoch 00135: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 11ms/step - loss: 0.1086 - accuracy: 0.8937 - val_loss: 0.2044 - val_accuracy: 0.7723
Epoch 136/200
25/27 [==========================>...] - ETA: 0s - loss: 0.1268 - accuracy: 0.8851
Epoch 00136: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 11ms/step - loss: 0.1300 - accuracy: 0.8750 - val_loss: 0.2065 - val_accuracy: 0.7634
Epoch 137/200
27/27 [==============================] - ETA: 0s - loss: 0.1326 - accuracy: 0.8680
Epoch 00137: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1326 - accuracy: 0.8680 - val_loss: 0.2015 - val_accuracy: 0.7902
Epoch 138/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1179 - accuracy: 0.8920
Epoch 00138: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1193 - accuracy: 0.8925 - val_loss: 0.2081 - val_accuracy: 0.7768
Epoch 139/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1075 - accuracy: 0.8908
Epoch 00139: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1089 - accuracy: 0.8902 - val_loss: 0.2169 - val_accuracy: 0.7812
Epoch 140/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1174 - accuracy: 0.8822
Epoch 00140: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1181 - accuracy: 0.8820 - val_loss: 0.2233 - val_accuracy: 0.7589
Epoch 141/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1208 - accuracy: 0.8654
Epoch 00141: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1203 - accuracy: 0.8657 - val_loss: 0.2211 - val_accuracy: 0.7812
Epoch 142/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1230 - accuracy: 0.8762
Epoch 00142: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1210 - accuracy: 0.8785 - val_loss: 0.2216 - val_accuracy: 0.7857
Epoch 143/200
27/27 [==============================] - ETA: 0s - loss: 0.1478 - accuracy: 0.8458
Epoch 00143: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1478 - accuracy: 0.8458 - val_loss: 0.2240 - val_accuracy: 0.7679
Epoch 144/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1301 - accuracy: 0.8568
Epoch 00144: val_accuracy did not improve from 0.79018
27/27 [==============================] - 0s 12ms/step - loss: 0.1320 - accuracy: 0.8551 - val_loss: 0.2021 - val_accuracy: 0.7589
Epoch 145/200
27/27 [==============================] - ETA: 0s - loss: 0.1120 - accuracy: 0.8879
Epoch 00145: val_accuracy improved from 0.79018 to 0.80357, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 73ms/step - loss: 0.1120 - accuracy: 0.8879 - val_loss: 0.2012 - val_accuracy: 0.8036
Epoch 146/200
22/27 [=======================>......] - ETA: 0s - loss: 0.1200 - accuracy: 0.8836
Epoch 00146: val_accuracy did not improve from 0.80357
27/27 [==============================] - 0s 12ms/step - loss: 0.1160 - accuracy: 0.8843 - val_loss: 0.2182 - val_accuracy: 0.7679
Epoch 147/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1154 - accuracy: 0.8835
Epoch 00147: val_accuracy did not improve from 0.80357
27/27 [==============================] - 0s 12ms/step - loss: 0.1145 - accuracy: 0.8820 - val_loss: 0.2488 - val_accuracy: 0.7946
Epoch 148/200
27/27 [==============================] - ETA: 0s - loss: 0.1005 - accuracy: 0.9030
Epoch 00148: val_accuracy improved from 0.80357 to 0.80804, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 81ms/step - loss: 0.1005 - accuracy: 0.9030 - val_loss: 0.2009 - val_accuracy: 0.8080
Epoch 149/200
23/27 [========================>.....] - ETA: 0s - loss: 0.1161 - accuracy: 0.8750
Epoch 00149: val_accuracy improved from 0.80804 to 0.84375, saving model to ./base.model
INFO:tensorflow:Assets written to: ./base.model/assets
27/27 [==============================] - 2s 74ms/step - loss: 0.1156 - accuracy: 0.8785 - val_loss: 0.1886 - val_accuracy: 0.8438
Epoch 150/200
27/27 [==============================] - ETA: 0s - loss: 0.1240 - accuracy: 0.8738
Epoch 00150: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1240 - accuracy: 0.8738 - val_loss: 0.1993 - val_accuracy: 0.7768
Epoch 151/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1094 - accuracy: 0.8871
Epoch 00151: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1081 - accuracy: 0.8890 - val_loss: 0.1895 - val_accuracy: 0.7991
Epoch 152/200
27/27 [==============================] - ETA: 0s - loss: 0.1054 - accuracy: 0.8855
Epoch 00152: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1054 - accuracy: 0.8855 - val_loss: 0.2501 - val_accuracy: 0.7902
Epoch 153/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1266 - accuracy: 0.8786
Epoch 00153: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1246 - accuracy: 0.8808 - val_loss: 0.2074 - val_accuracy: 0.7946
Epoch 154/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1160 - accuracy: 0.8811
Epoch 00154: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1161 - accuracy: 0.8832 - val_loss: 0.2426 - val_accuracy: 0.7589
Epoch 155/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1077 - accuracy: 0.8823
Epoch 00155: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1089 - accuracy: 0.8832 - val_loss: 0.2221 - val_accuracy: 0.7812
Epoch 156/200
27/27 [==============================] - ETA: 0s - loss: 0.1035 - accuracy: 0.8984
Epoch 00156: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1035 - accuracy: 0.8984 - val_loss: 0.1988 - val_accuracy: 0.7812
Epoch 157/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1172 - accuracy: 0.8786
Epoch 00157: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1167 - accuracy: 0.8773 - val_loss: 0.2128 - val_accuracy: 0.8036
Epoch 158/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1134 - accuracy: 0.8811
Epoch 00158: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1133 - accuracy: 0.8820 - val_loss: 0.1882 - val_accuracy: 0.8036
Epoch 159/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1267 - accuracy: 0.8859
Epoch 00159: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 13ms/step - loss: 0.1247 - accuracy: 0.8879 - val_loss: 0.2105 - val_accuracy: 0.7946
Epoch 160/200
25/27 [==========================>...] - ETA: 0s - loss: 0.1373 - accuracy: 0.8649
Epoch 00160: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 13ms/step - loss: 0.1354 - accuracy: 0.8657 - val_loss: 0.2280 - val_accuracy: 0.7723
Epoch 161/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1148 - accuracy: 0.8774
Epoch 00161: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 13ms/step - loss: 0.1135 - accuracy: 0.8797 - val_loss: 0.1797 - val_accuracy: 0.8214
Epoch 162/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0934 - accuracy: 0.9126
Epoch 00162: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0937 - accuracy: 0.9124 - val_loss: 0.2099 - val_accuracy: 0.7812
Epoch 163/200
27/27 [==============================] - ETA: 0s - loss: 0.1015 - accuracy: 0.9019
Epoch 00163: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1015 - accuracy: 0.9019 - val_loss: 0.2096 - val_accuracy: 0.7946
Epoch 164/200
27/27 [==============================] - ETA: 0s - loss: 0.1143 - accuracy: 0.8843
Epoch 00164: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1143 - accuracy: 0.8843 - val_loss: 0.2114 - val_accuracy: 0.7812
Epoch 165/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0846 - accuracy: 0.9175
Epoch 00165: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0859 - accuracy: 0.9159 - val_loss: 0.1982 - val_accuracy: 0.8036
Epoch 166/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1103 - accuracy: 0.8920
Epoch 00166: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1109 - accuracy: 0.8925 - val_loss: 0.1894 - val_accuracy: 0.7723
Epoch 167/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1240 - accuracy: 0.8871
Epoch 00167: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1216 - accuracy: 0.8879 - val_loss: 0.2359 - val_accuracy: 0.7857
Epoch 168/200
27/27 [==============================] - ETA: 0s - loss: 0.1110 - accuracy: 0.8890
Epoch 00168: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1110 - accuracy: 0.8890 - val_loss: 0.2110 - val_accuracy: 0.7812
Epoch 169/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0896 - accuracy: 0.9038
Epoch 00169: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0898 - accuracy: 0.9062 - val_loss: 0.1985 - val_accuracy: 0.7946
Epoch 170/200
24/27 [=========================>....] - ETA: 0s - loss: 0.0938 - accuracy: 0.9053
Epoch 00170: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 11ms/step - loss: 0.0929 - accuracy: 0.9065 - val_loss: 0.1910 - val_accuracy: 0.8170
Epoch 171/200
24/27 [=========================>....] - ETA: 0s - loss: 0.0879 - accuracy: 0.9026
Epoch 00171: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 11ms/step - loss: 0.0847 - accuracy: 0.9054 - val_loss: 0.2144 - val_accuracy: 0.8036
Epoch 172/200
27/27 [==============================] - ETA: 0s - loss: 0.0979 - accuracy: 0.8949
Epoch 00172: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0979 - accuracy: 0.8949 - val_loss: 0.2084 - val_accuracy: 0.8259
Epoch 173/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0963 - accuracy: 0.9066
Epoch 00173: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0959 - accuracy: 0.9042 - val_loss: 0.1881 - val_accuracy: 0.7991
Epoch 174/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0928 - accuracy: 0.9066
Epoch 00174: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0911 - accuracy: 0.9089 - val_loss: 0.2074 - val_accuracy: 0.8036
Epoch 175/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1145 - accuracy: 0.9029
Epoch 00175: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1153 - accuracy: 0.9007 - val_loss: 0.1942 - val_accuracy: 0.8036
Epoch 176/200
27/27 [==============================] - ETA: 0s - loss: 0.0903 - accuracy: 0.9100
Epoch 00176: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0903 - accuracy: 0.9100 - val_loss: 0.2325 - val_accuracy: 0.7946
Epoch 177/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0976 - accuracy: 0.9102
Epoch 00177: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0958 - accuracy: 0.9124 - val_loss: 0.2503 - val_accuracy: 0.7679
Epoch 178/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1108 - accuracy: 0.8944
Epoch 00178: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1090 - accuracy: 0.8972 - val_loss: 0.2095 - val_accuracy: 0.7768
Epoch 179/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0854 - accuracy: 0.9078
Epoch 00179: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0874 - accuracy: 0.9065 - val_loss: 0.2224 - val_accuracy: 0.7679
Epoch 180/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1115 - accuracy: 0.8944
Epoch 00180: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1098 - accuracy: 0.8972 - val_loss: 0.2150 - val_accuracy: 0.7812
Epoch 181/200
27/27 [==============================] - ETA: 0s - loss: 0.0872 - accuracy: 0.9229
Epoch 00181: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0872 - accuracy: 0.9229 - val_loss: 0.2079 - val_accuracy: 0.8080
Epoch 182/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0929 - accuracy: 0.9053
Epoch 00182: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0948 - accuracy: 0.9054 - val_loss: 0.1885 - val_accuracy: 0.8170
Epoch 183/200
27/27 [==============================] - ETA: 0s - loss: 0.0792 - accuracy: 0.9276
Epoch 00183: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0792 - accuracy: 0.9276 - val_loss: 0.2108 - val_accuracy: 0.8036
Epoch 184/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0962 - accuracy: 0.9114
Epoch 00184: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0981 - accuracy: 0.9089 - val_loss: 0.1930 - val_accuracy: 0.8080
Epoch 185/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0796 - accuracy: 0.9150
Epoch 00185: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0795 - accuracy: 0.9136 - val_loss: 0.2040 - val_accuracy: 0.7946
Epoch 186/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0984 - accuracy: 0.9029
Epoch 00186: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1007 - accuracy: 0.9019 - val_loss: 0.1903 - val_accuracy: 0.8214
Epoch 187/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0820 - accuracy: 0.9138
Epoch 00187: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0842 - accuracy: 0.9124 - val_loss: 0.2017 - val_accuracy: 0.8125
Epoch 188/200
27/27 [==============================] - ETA: 0s - loss: 0.0877 - accuracy: 0.9171
Epoch 00188: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0877 - accuracy: 0.9171 - val_loss: 0.1958 - val_accuracy: 0.8125
Epoch 189/200
27/27 [==============================] - ETA: 0s - loss: 0.0741 - accuracy: 0.9229
Epoch 00189: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0741 - accuracy: 0.9229 - val_loss: 0.1963 - val_accuracy: 0.7946
Epoch 190/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0798 - accuracy: 0.9187
Epoch 00190: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0786 - accuracy: 0.9194 - val_loss: 0.2083 - val_accuracy: 0.7991
Epoch 191/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0867 - accuracy: 0.9114
Epoch 00191: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0852 - accuracy: 0.9136 - val_loss: 0.2087 - val_accuracy: 0.7812
Epoch 192/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0989 - accuracy: 0.9066
Epoch 00192: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1000 - accuracy: 0.9030 - val_loss: 0.2175 - val_accuracy: 0.7946
Epoch 193/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0872 - accuracy: 0.9163
Epoch 00193: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0860 - accuracy: 0.9171 - val_loss: 0.2086 - val_accuracy: 0.7991
Epoch 194/200
26/27 [===========================>..] - ETA: 0s - loss: 0.1207 - accuracy: 0.8932
Epoch 00194: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.1199 - accuracy: 0.8937 - val_loss: 0.1934 - val_accuracy: 0.7857
Epoch 195/200
27/27 [==============================] - ETA: 0s - loss: 0.0997 - accuracy: 0.9042
Epoch 00195: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 11ms/step - loss: 0.0997 - accuracy: 0.9042 - val_loss: 0.2389 - val_accuracy: 0.7455
Epoch 196/200
25/27 [==========================>...] - ETA: 0s - loss: 0.0958 - accuracy: 0.9100
Epoch 00196: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 11ms/step - loss: 0.0948 - accuracy: 0.9124 - val_loss: 0.1888 - val_accuracy: 0.7946
Epoch 197/200
27/27 [==============================] - ETA: 0s - loss: 0.0837 - accuracy: 0.9190
Epoch 00197: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0837 - accuracy: 0.9190 - val_loss: 0.1676 - val_accuracy: 0.8170
Epoch 198/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0649 - accuracy: 0.9430
Epoch 00198: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0671 - accuracy: 0.9404 - val_loss: 0.2244 - val_accuracy: 0.7679
Epoch 199/200
27/27 [==============================] - ETA: 0s - loss: 0.0756 - accuracy: 0.9299
Epoch 00199: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0756 - accuracy: 0.9299 - val_loss: 0.1860 - val_accuracy: 0.7991
Epoch 200/200
26/27 [===========================>..] - ETA: 0s - loss: 0.0877 - accuracy: 0.9078
Epoch 00200: val_accuracy did not improve from 0.84375
27/27 [==============================] - 0s 12ms/step - loss: 0.0854 - accuracy: 0.9100 - val_loss: 0.2092 - val_accuracy: 0.8170

Loss/Accuracy vs Epoch

In [19]:
show_final_history(history)
model.save("model.h5")
print("Weights Saved")
Weights Saved

Making predictions on the test images

In [20]:
test_pred = model.predict(test_images)
test_pred = np.argmax(test_pred,axis=1)
test_actual = np.argmax(test_labels,axis=1)

rnd_idx = random.sample(range(0,100),5)

class_labels = {i:class_name for (class_name,i) in class_name_labels.items()}

for i,idx in enumerate(rnd_idx):
    plt.imshow(test_images[idx])
    plt.title("Actual: {}\nPredicted: {}".format(class_labels[test_actual[idx]],class_labels[test_pred[idx]]))
    plt.grid(None)
    plt.show()
    pass
Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).

DeepCC

In [ ]:
!deepCC model.h5
[INFO]
Reading [keras model] 'model.h5'
[SUCCESS]
Saved 'model_deepC/model.onnx'
[INFO]
Reading [onnx model] 'model_deepC/model.onnx'
[INFO]
Model info:
  ir_vesion : 5
  doc       : 
[WARNING]
[ONNX]: graph-node conv2d's attribute auto_pad has no meaningful data.
[WARNING]
[ONNX]: terminal (input/output) input_1's shape is less than 1. Changing it to 1.
[WARNING]
[ONNX]: terminal (input/output) dense_1's shape is less than 1. Changing it to 1.
WARN (GRAPH): found operator node with the same name (dense_1) as io node.
[INFO]
Running DNNC graph sanity check ...
[SUCCESS]
Passed sanity check.
[INFO]
Writing C++ file 'model_deepC/model.cpp'
[INFO]
deepSea model files are ready in 'model_deepC/' 
[RUNNING COMMAND]
g++ -std=c++11 -O3 -fno-rtti -fno-exceptions -I. -I/opt/tljh/user/lib/python3.7/site-packages/deepC-0.13-py3.7-linux-x86_64.egg/deepC/include -isystem /opt/tljh/user/lib/python3.7/site-packages/deepC-0.13-py3.7-linux-x86_64.egg/deepC/packages/eigen-eigen-323c052e1731 "model_deepC/model.cpp" -D_AITS_MAIN -o "model_deepC/model.exe"
In [ ]: