Artificial Intelligence Nanodegree

Convolutional Neural Networks

Project: Write an Algorithm for a Dog Identification App


In this notebook, some template code has already been provided for you, and you will need to implement additional functionality to successfully complete this project. You will not need to modify the included code beyond what is requested. Sections that begin with '(IMPLEMENTATION)' in the header indicate that the following block of code will require additional functionality which you must provide. Instructions will be provided for each section, and the specifics of the implementation are marked in the code block with a 'TODO' statement. Please be sure to read the instructions carefully!

Note: Once you have completed all of the code implementations, you need to finalize your work by exporting the iPython Notebook as an HTML document. Before exporting the notebook to html, all of the code cells need to have been run so that reviewers can see the final implementation and output. You can then export the notebook by using the menu above and navigating to \n", "File -> Download as -> HTML (.html). Include the finished document along with this notebook as your submission.

In addition to implementing code, there will be questions that you must answer which relate to the project and your implementation. Each section where you will answer a question is preceded by a 'Question X' header. Carefully read each question and provide thorough answers in the following text boxes that begin with 'Answer:'. Your project submission will be evaluated based on your answers to each of the questions and the implementation you provide.

Note: Code and Markdown cells can be executed using the Shift + Enter keyboard shortcut. Markdown cells can be edited by double-clicking the cell to enter edit mode.

The rubric contains optional "Stand Out Suggestions" for enhancing the project beyond the minimum requirements. If you decide to pursue the "Stand Out Suggestions", you should include the code in this IPython notebook.


Why We're Here

In this notebook, you will make the first steps towards developing an algorithm that could be used as part of a mobile or web app. At the end of this project, your code will accept any user-supplied image as input. If a dog is detected in the image, it will provide an estimate of the dog's breed. If a human is detected, it will provide an estimate of the dog breed that is most resembling. The image below displays potential sample output of your finished project (... but we expect that each student's algorithm will behave differently!).

In this real-world setting, you will need to piece together a series of models to perform different tasks; for instance, the algorithm that detects humans in an image will be different from the CNN that infers dog breed. There are many points of possible failure, and no perfect algorithm exists. Your imperfect solution will nonetheless create a fun user experience!

The Road Ahead

We break the notebook into separate steps. Feel free to use the links below to navigate the notebook.

  • Step 0: Import Datasets
  • Step 1: Detect Humans
  • Step 2: Detect Dogs
  • Step 3: Create a CNN to Classify Dog Breeds (from Scratch)
  • Step 4: Use a CNN to Classify Dog Breeds (using Transfer Learning)
  • Step 5: Create a CNN to Classify Dog Breeds (using Transfer Learning)
  • Step 6: Write your Algorithm
  • Step 7: Test Your Algorithm

Step 0: Import Datasets

Import Dog Dataset

In the code cell below, we import a dataset of dog images. We populate a few variables through the use of the load_files function from the scikit-learn library:

  • train_files, valid_files, test_files - numpy arrays containing file paths to images
  • train_targets, valid_targets, test_targets - numpy arrays containing onehot-encoded classification labels
  • dog_names - list of string-valued dog breed names for translating labels

In [1]:
from sklearn.datasets import load_files       
from keras.utils import np_utils
import numpy as np
from glob import glob

# define function to load train, test, and validation datasets
def load_dataset(path):
    data = load_files(path)
    dog_files = np.array(data['filenames'])
    dog_targets = np_utils.to_categorical(np.array(data['target']), 133)
    return dog_files, dog_targets

# load train, test, and validation datasets
train_files, train_targets = load_dataset('dogImages/dogImages/train')
valid_files, valid_targets = load_dataset('dogImages/dogImages/valid')
test_files, test_targets = load_dataset('dogImages/dogImages/test')

# load list of dog names
dog_names = [item[20:-1] for item in sorted(glob("dogImages/dogImages/train/*/"))]

# print statistics about the dataset
print('There are %d total dog categories.' % len(dog_names))
print('There are %s total dog images.\n' % len(np.hstack([train_files, valid_files, test_files])))
print('There are %d training dog images.' % len(train_files))
print('There are %d validation dog images.' % len(valid_files))
print('There are %d test dog images.'% len(test_files))


Using TensorFlow backend.
There are 133 total dog categories.
There are 8351 total dog images.

There are 6680 training dog images.
There are 835 validation dog images.
There are 836 test dog images.

Import Human Dataset

In the code cell below, we import a dataset of human images, where the file paths are stored in the numpy array human_files.


In [2]:
import random
random.seed(8675309)

# load filenames in shuffled human dataset
human_files = np.array(glob("lfw/lfw/*/*"))
random.shuffle(human_files)

# print statistics about the dataset
print('There are %d total human images.' % len(human_files))


There are 13233 total human images.

Step 1: Detect Humans

We use OpenCV's implementation of Haar feature-based cascade classifiers to detect human faces in images. OpenCV provides many pre-trained face detectors, stored as XML files on github. We have downloaded one of these detectors and stored it in the haarcascades directory.

In the next code cell, we demonstrate how to use this detector to find human faces in a sample image.


In [3]:
import cv2                
import matplotlib.pyplot as plt                        
%matplotlib inline                               

# extract pre-trained face detector
face_cascade = cv2.CascadeClassifier('haarcascades/haarcascade_frontalface_alt.xml')

# load color (BGR) image
img = cv2.imread(human_files[3])
# convert BGR image to grayscale
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

# find faces in image
faces = face_cascade.detectMultiScale(gray)

# print number of faces detected in the image
print('Number of faces detected:', len(faces))

# get bounding box for each detected face
for (x,y,w,h) in faces:
    # add bounding box to color image
    cv2.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2)
    
# convert BGR image to RGB for plotting
cv_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

# display the image, along with bounding box
plt.imshow(cv_rgb)
plt.show()


Number of faces detected: 1

Before using any of the face detectors, it is standard procedure to convert the images to grayscale. The detectMultiScale function executes the classifier stored in face_cascade and takes the grayscale image as a parameter.

In the above code, faces is a numpy array of detected faces, where each row corresponds to a detected face. Each detected face is a 1D array with four entries that specifies the bounding box of the detected face. The first two entries in the array (extracted in the above code as x and y) specify the horizontal and vertical positions of the top left corner of the bounding box. The last two entries in the array (extracted here as w and h) specify the width and height of the box.

Write a Human Face Detector

We can use this procedure to write a function that returns True if a human face is detected in an image and False otherwise. This function, aptly named face_detector, takes a string-valued file path to an image as input and appears in the code block below.


In [4]:
# returns "True" if face is detected in image stored at img_path
def face_detector(img_path):
    img = cv2.imread(img_path)
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    faces = face_cascade.detectMultiScale(gray)
    return len(faces) > 0

(IMPLEMENTATION) Assess the Human Face Detector

Question 1: Use the code cell below to test the performance of the face_detector function.

  • What percentage of the first 100 images in human_files have a detected human face?
  • What percentage of the first 100 images in dog_files have a detected human face?

Ideally, we would like 100% of human images with a detected face and 0% of dog images with a detected face. You will see that our algorithm falls short of this goal, but still gives acceptable performance. We extract the file paths for the first 100 images from each of the datasets and store them in the numpy arrays human_files_short and dog_files_short.

Answer:

Answers for both questions are in the following code cell


In [69]:
human_files_short = human_files[:100]
dog_files_short = train_files[:100]
# Do NOT modify the code above this line.

## TODO: Test the performance of the face_detector algorithm 
## on the images in human_files_short and dog_files_short.
'''
human_count = 0
for human_img in human_files_short:
    if face_detector(human_img):
        human_count = human_count + 1
        
dog_count = 0
for dog_img in dog_files_short:
    if face_detector(dog_img):
        dog_count = dog_count + 1
print(str(human_count) + "% of the humans were detected as humans!")
print(str(dog_count) + "% of the dogs were detected as humans")'''

human_file = [face_detector(file) for file in human_files_short]
dog_file = [face_detector(file) for file in dog_files_short]

human_percentage = human_file.count(True) / len(human_file) * 100
human_in_dog_percentange = dog_file.count(True) / len(dog_file) * 100

## TODO: Test the performance of the face_detector algorithm 
## on the images in human_files_short and dog_files_short.
print("% of human faces detected in human file : {}%".format(human_percentage))
print("% of human faces deteted in dog file : {}%".format(human_in_dog_percentange))


% of human faces detected in human file : 99.0%
% of human faces deteted in dog file : 11.0%

Question 2: This algorithmic choice necessitates that we communicate to the user that we accept human images only when they provide a clear view of a face (otherwise, we risk having unneccessarily frustrated users!). In your opinion, is this a reasonable expectation to pose on the user? If not, can you think of a way to detect humans in images that does not necessitate an image with a clearly presented face?

Answer:

I think that if the web app mantains it really clear in the UI that it needs a clear view of a face, it is acceptable. A way to detect humans in images could be to train a CNN with many human images in different angles and an augmented data set to be able to do that.

We suggest the face detector from OpenCV as a potential way to detect human images in your algorithm, but you are free to explore other approaches, especially approaches that make use of deep learning :). Please use the code cell below to design and test your own face detection algorithm. If you decide to pursue this optional task, report performance on each of the datasets.


In [10]:
## (Optional) TODO: Report the performance of another  
## face detection algorithm on the LFW dataset
### Feel free to use as many code cells as needed.

Step 2: Detect Dogs

In this section, we use a pre-trained ResNet-50 model to detect dogs in images. Our first line of code downloads the ResNet-50 model, along with weights that have been trained on ImageNet, a very large, very popular dataset used for image classification and other vision tasks. ImageNet contains over 10 million URLs, each linking to an image containing an object from one of 1000 categories. Given an image, this pre-trained ResNet-50 model returns a prediction (derived from the available categories in ImageNet) for the object that is contained in the image.


In [11]:
from keras.applications.resnet50 import ResNet50

# define ResNet50 model
ResNet50_model = ResNet50(weights='imagenet')

Pre-process the Data

When using TensorFlow as backend, Keras CNNs require a 4D array (which we'll also refer to as a 4D tensor) as input, with shape

$$ (\text{nb_samples}, \text{rows}, \text{columns}, \text{channels}), $$

where nb_samples corresponds to the total number of images (or samples), and rows, columns, and channels correspond to the number of rows, columns, and channels for each image, respectively.

The path_to_tensor function below takes a string-valued file path to a color image as input and returns a 4D tensor suitable for supplying to a Keras CNN. The function first loads the image and resizes it to a square image that is $224 \times 224$ pixels. Next, the image is converted to an array, which is then resized to a 4D tensor. In this case, since we are working with color images, each image has three channels. Likewise, since we are processing a single image (or sample), the returned tensor will always have shape

$$ (1, 224, 224, 3). $$

The paths_to_tensor function takes a numpy array of string-valued image paths as input and returns a 4D tensor with shape

$$ (\text{nb_samples}, 224, 224, 3). $$

Here, nb_samples is the number of samples, or number of images, in the supplied array of image paths. It is best to think of nb_samples as the number of 3D tensors (where each 3D tensor corresponds to a different image) in your dataset!


In [12]:
from keras.preprocessing import image                  
from tqdm import tqdm

def path_to_tensor(img_path):
    # loads RGB image as PIL.Image.Image type
    img = image.load_img(img_path, target_size=(224, 224))
    # convert PIL.Image.Image type to 3D tensor with shape (224, 224, 3)
    x = image.img_to_array(img)
    # convert 3D tensor to 4D tensor with shape (1, 224, 224, 3) and return 4D tensor
    return np.expand_dims(x, axis=0)

def paths_to_tensor(img_paths):
    list_of_tensors = [path_to_tensor(img_path) for img_path in tqdm(img_paths)]
    return np.vstack(list_of_tensors)

Making Predictions with ResNet-50

Getting the 4D tensor ready for ResNet-50, and for any other pre-trained model in Keras, requires some additional processing. First, the RGB image is converted to BGR by reordering the channels. All pre-trained models have the additional normalization step that the mean pixel (expressed in RGB as $[103.939, 116.779, 123.68]$ and calculated from all pixels in all images in ImageNet) must be subtracted from every pixel in each image. This is implemented in the imported function preprocess_input. If you're curious, you can check the code for preprocess_input here.

Now that we have a way to format our image for supplying to ResNet-50, we are now ready to use the model to extract the predictions. This is accomplished with the predict method, which returns an array whose $i$-th entry is the model's predicted probability that the image belongs to the $i$-th ImageNet category. This is implemented in the ResNet50_predict_labels function below.

By taking the argmax of the predicted probability vector, we obtain an integer corresponding to the model's predicted object class, which we can identify with an object category through the use of this dictionary.


In [13]:
from keras.applications.resnet50 import preprocess_input, decode_predictions

def ResNet50_predict_labels(img_path):
    # returns prediction vector for image located at img_path
    img = preprocess_input(path_to_tensor(img_path))
    return np.argmax(ResNet50_model.predict(img))

Write a Dog Detector

While looking at the dictionary, you will notice that the categories corresponding to dogs appear in an uninterrupted sequence and correspond to dictionary keys 151-268, inclusive, to include all categories from 'Chihuahua' to 'Mexican hairless'. Thus, in order to check to see if an image is predicted to contain a dog by the pre-trained ResNet-50 model, we need only check if the ResNet50_predict_labels function above returns a value between 151 and 268 (inclusive).

We use these ideas to complete the dog_detector function below, which returns True if a dog is detected in an image (and False if not).


In [14]:
### returns "True" if a dog is detected in the image stored at img_path
def dog_detector(img_path):
    prediction = ResNet50_predict_labels(img_path)
    return ((prediction <= 268) & (prediction >= 151))

(IMPLEMENTATION) Assess the Dog Detector

Question 3: Use the code cell below to test the performance of your dog_detector function.

  • What percentage of the images in human_files_short have a detected dog?
  • What percentage of the images in dog_files_short have a detected dog?

Answer:


In [70]:
### TODO: Test the performance of the dog_detector function
### on the images in human_files_short and dog_files_short.
'''
human_count = 0
for human_img in human_files_short:
    if dog_detector(human_img):
        human_count = human_count + 1
        
dog_count = 0
for dog_img in dog_files_short:
    if dog_detector(dog_img):
        dog_count = dog_count + 1
        
print(str(human_count) + "% of the humans were detected as dogs")
print(str(dog_count) + "% of the dogs were detected as dogs!")'''

human_file = [dog_detector(file) for file in human_files_short]
dog_file = [dog_detector(file) for file in dog_files_short]

p_detected_dog_in_human_file = human_file.count(True) / len(human_file) * 100
p_detected_dog_in_dog_file = dog_file.count(True) / len(dog_file) * 100

print("Percentage of the images in human_files_short have a detected dog: {}%".format(p_detected_dog_in_human_file))
print("Percentage of the images in dog_files_short have a detected dog {}%".format(p_detected_dog_in_dog_file))


Percentage of the images in human_files_short have a detected dog: 1.0%
Percentage of the images in dog_files_short have a detected dog 100.0%

Step 3: Create a CNN to Classify Dog Breeds (from Scratch)

Now that we have functions for detecting humans and dogs in images, we need a way to predict breed from images. In this step, you will create a CNN that classifies dog breeds. You must create your CNN from scratch (so, you can't use transfer learning yet!), and you must attain a test accuracy of at least 1%. In Step 5 of this notebook, you will have the opportunity to use transfer learning to create a CNN that attains greatly improved accuracy.

Be careful with adding too many trainable layers! More parameters means longer training, which means you are more likely to need a GPU to accelerate the training process. Thankfully, Keras provides a handy estimate of the time that each epoch is likely to take; you can extrapolate this estimate to figure out how long it will take for your algorithm to train.

We mention that the task of assigning breed to dogs from images is considered exceptionally challenging. To see why, consider that even a human would have great difficulty in distinguishing between a Brittany and a Welsh Springer Spaniel.

Brittany Welsh Springer Spaniel

It is not difficult to find other dog breed pairs with minimal inter-class variation (for instance, Curly-Coated Retrievers and American Water Spaniels).

Curly-Coated Retriever American Water Spaniel

Likewise, recall that labradors come in yellow, chocolate, and black. Your vision-based algorithm will have to conquer this high intra-class variation to determine how to classify all of these different shades as the same breed.

Yellow Labrador Chocolate Labrador Black Labrador

We also mention that random chance presents an exceptionally low bar: setting aside the fact that the classes are slightly imabalanced, a random guess will provide a correct answer roughly 1 in 133 times, which corresponds to an accuracy of less than 1%.

Remember that the practice is far ahead of the theory in deep learning. Experiment with many different architectures, and trust your intuition. And, of course, have fun!

Pre-process the Data

We rescale the images by dividing every pixel in every image by 255.


In [16]:
from PIL import ImageFile                            
ImageFile.LOAD_TRUNCATED_IMAGES = True                 

# pre-process the data for Keras
train_tensors = paths_to_tensor(train_files).astype('float32')/255
valid_tensors = paths_to_tensor(valid_files).astype('float32')/255
test_tensors = paths_to_tensor(test_files).astype('float32')/255


100%|█████████████████████████████████████████████████████████████████████████████| 6680/6680 [00:54<00:00, 122.64it/s]
100%|███████████████████████████████████████████████████████████████████████████████| 835/835 [00:06<00:00, 134.30it/s]
100%|███████████████████████████████████████████████████████████████████████████████| 836/836 [00:06<00:00, 136.50it/s]

(IMPLEMENTATION) Model Architecture

Create a CNN to classify dog breed. At the end of your code cell block, summarize the layers of your model by executing the line:

    model.summary()

We have imported some Python modules to get you started, but feel free to import as many modules as you need. If you end up getting stuck, here's a hint that specifies a model that trains relatively fast on CPU and attains >1% test accuracy in 5 epochs:

Question 4: Outline the steps you took to get to your final CNN architecture and your reasoning at each step. If you chose to use the hinted architecture above, describe why you think that CNN architecture should work well for the image classification task.

Answer:


In [18]:
from keras.layers import Conv2D, MaxPooling2D, GlobalAveragePooling2D
from keras.layers import Dropout, Flatten, Dense
from keras.models import Sequential

model = Sequential()

### TODO: Define your architecture.
model.add(Conv2D(filters=16, kernel_size=2, padding='same', activation='relu', 
                        input_shape=(224, 224, 3)))
model.add(MaxPooling2D(pool_size=2))
model.add(Conv2D(filters=32, kernel_size=2, padding='same', activation='relu'))
model.add(MaxPooling2D(pool_size=2))
model.add(Conv2D(filters=64, kernel_size=2, padding='same', activation='relu'))
model.add(MaxPooling2D(pool_size=2))
model.add(Dropout(0.3))
model.add(Flatten())
model.add(Dense(500, activation='relu'))
model.add(Dropout(0.4))
model.add(Dense(133, activation='softmax'))

model.summary()


_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
conv2d_1 (Conv2D)            (None, 224, 224, 16)      208       
_________________________________________________________________
max_pooling2d_3 (MaxPooling2 (None, 112, 112, 16)      0         
_________________________________________________________________
conv2d_2 (Conv2D)            (None, 112, 112, 32)      2080      
_________________________________________________________________
max_pooling2d_4 (MaxPooling2 (None, 56, 56, 32)        0         
_________________________________________________________________
conv2d_3 (Conv2D)            (None, 56, 56, 64)        8256      
_________________________________________________________________
max_pooling2d_5 (MaxPooling2 (None, 28, 28, 64)        0         
_________________________________________________________________
dropout_1 (Dropout)          (None, 28, 28, 64)        0         
_________________________________________________________________
flatten_3 (Flatten)          (None, 50176)             0         
_________________________________________________________________
dense_1 (Dense)              (None, 500)               25088500  
_________________________________________________________________
dropout_2 (Dropout)          (None, 500)               0         
_________________________________________________________________
dense_2 (Dense)              (None, 133)               66633     
=================================================================
Total params: 25,165,677.0
Trainable params: 25,165,677.0
Non-trainable params: 0.0
_________________________________________________________________

Reasoning behind the CNN architecture

The idea of having multiple layers was to extract the features from the images. To do this, the filters were halfed in each conv layer. There were max pooling layers between them. There were also dropout layers to prevent overfitting. A relu function was used in the dense layer, and then, for the output, a softmax since it's the best for classification.

Compile the Model


In [19]:
model.compile(optimizer='rmsprop', loss='categorical_crossentropy', metrics=['accuracy'])

(IMPLEMENTATION) Train the Model

Train your model in the code cell below. Use model checkpointing to save the model that attains the best validation loss.

You are welcome to augment the training data, but this is not a requirement.


In [21]:
from keras.callbacks import ModelCheckpoint  

### TODO: specify the number of epochs that you would like to use to train the model.

epochs = 5

### Do NOT modify the code below this line.

checkpointer = ModelCheckpoint(filepath='saved_models/weights.best.from_scratch.hdf5', 
                               verbose=1, save_best_only=True)

model.fit(train_tensors, train_targets, 
          validation_data=(valid_tensors, valid_targets),
          epochs=epochs, batch_size=20, callbacks=[checkpointer], verbose=1)


Train on 6680 samples, validate on 835 samples
Epoch 1/5
6660/6680 [============================>.] - ETA: 608s - loss: 4.8593 - acc: 0.0000e+00 - ETA: 461s - loss: 9.5659 - acc: 0.0000e+00 - ETA: 414s - loss: 9.4465 - acc: 0.0167     - ETA: 391s - loss: 8.7754 - acc: 0.0125 - ETA: 376s - loss: 8.0249 - acc: 0.0100 - ETA: 365s - loss: 7.5999 - acc: 0.0083 - ETA: 357s - loss: 7.2157 - acc: 0.0071 - ETA: 349s - loss: 6.9372 - acc: 0.0063 - ETA: 346s - loss: 6.7306 - acc: 0.0056 - ETA: 342s - loss: 6.5538 - acc: 0.0050 - ETA: 338s - loss: 6.4036 - acc: 0.0045 - ETA: 335s - loss: 6.2785 - acc: 0.0083 - ETA: 332s - loss: 6.1710 - acc: 0.0115 - ETA: 330s - loss: 6.0865 - acc: 0.0107 - ETA: 327s - loss: 6.0091 - acc: 0.0100 - ETA: 325s - loss: 5.9349 - acc: 0.0156 - ETA: 323s - loss: 5.8697 - acc: 0.0147 - ETA: 321s - loss: 5.8137 - acc: 0.0139 - ETA: 319s - loss: 5.7662 - acc: 0.0132 - ETA: 317s - loss: 5.7248 - acc: 0.0125 - ETA: 316s - loss: 5.6897 - acc: 0.0119 - ETA: 314s - loss: 5.6515 - acc: 0.0114 - ETA: 312s - loss: 5.6193 - acc: 0.0109 - ETA: 311s - loss: 5.5891 - acc: 0.0104 - ETA: 311s - loss: 5.5627 - acc: 0.0100 - ETA: 309s - loss: 5.5351 - acc: 0.0115 - ETA: 308s - loss: 5.5132 - acc: 0.0111 - ETA: 307s - loss: 5.4904 - acc: 0.0107 - ETA: 306s - loss: 5.4692 - acc: 0.0103 - ETA: 305s - loss: 5.4497 - acc: 0.0100 - ETA: 304s - loss: 5.4322 - acc: 0.0097 - ETA: 302s - loss: 5.4151 - acc: 0.0094 - ETA: 301s - loss: 5.3997 - acc: 0.0091 - ETA: 300s - loss: 5.3841 - acc: 0.0088 - ETA: 298s - loss: 5.3694 - acc: 0.0086 - ETA: 297s - loss: 5.3541 - acc: 0.0097 - ETA: 296s - loss: 5.3451 - acc: 0.0095 - ETA: 295s - loss: 5.3323 - acc: 0.0092 - ETA: 294s - loss: 5.3208 - acc: 0.0090 - ETA: 293s - loss: 5.3101 - acc: 0.0088 - ETA: 292s - loss: 5.2994 - acc: 0.0085 - ETA: 291s - loss: 5.2909 - acc: 0.0083 - ETA: 290s - loss: 5.2814 - acc: 0.0081 - ETA: 288s - loss: 5.2725 - acc: 0.0080 - ETA: 287s - loss: 5.2644 - acc: 0.0078 - ETA: 286s - loss: 5.2565 - acc: 0.0076 - ETA: 285s - loss: 5.2484 - acc: 0.0074 - ETA: 284s - loss: 5.2410 - acc: 0.0073 - ETA: 283s - loss: 5.2335 - acc: 0.0082 - ETA: 282s - loss: 5.2273 - acc: 0.0080 - ETA: 281s - loss: 5.2210 - acc: 0.0078 - ETA: 280s - loss: 5.2140 - acc: 0.0087 - ETA: 280s - loss: 5.2075 - acc: 0.0085 - ETA: 279s - loss: 5.2025 - acc: 0.0083 - ETA: 278s - loss: 5.1964 - acc: 0.0091 - ETA: 278s - loss: 5.1907 - acc: 0.0089 - ETA: 276s - loss: 5.1855 - acc: 0.0088 - ETA: 275s - loss: 5.1798 - acc: 0.0086 - ETA: 274s - loss: 5.1745 - acc: 0.0085 - ETA: 273s - loss: 5.1686 - acc: 0.0083 - ETA: 272s - loss: 5.1618 - acc: 0.0082 - ETA: 271s - loss: 5.1627 - acc: 0.0081 - ETA: 270s - loss: 5.1589 - acc: 0.0079 - ETA: 269s - loss: 5.1551 - acc: 0.0078 - ETA: 268s - loss: 5.1520 - acc: 0.0077 - ETA: 268s - loss: 5.1481 - acc: 0.0076 - ETA: 267s - loss: 5.1439 - acc: 0.0082 - ETA: 266s - loss: 5.1403 - acc: 0.0081 - ETA: 265s - loss: 5.1374 - acc: 0.0080 - ETA: 264s - loss: 5.1341 - acc: 0.0079 - ETA: 263s - loss: 5.1306 - acc: 0.0077 - ETA: 262s - loss: 5.1273 - acc: 0.0076 - ETA: 261s - loss: 5.1238 - acc: 0.0075 - ETA: 260s - loss: 5.1207 - acc: 0.0074 - ETA: 259s - loss: 5.1175 - acc: 0.0073 - ETA: 258s - loss: 5.1146 - acc: 0.0072 - ETA: 257s - loss: 5.1115 - acc: 0.0078 - ETA: 256s - loss: 5.1088 - acc: 0.0083 - ETA: 255s - loss: 5.1057 - acc: 0.0082 - ETA: 254s - loss: 5.1033 - acc: 0.0081 - ETA: 253s - loss: 5.1005 - acc: 0.0080 - ETA: 252s - loss: 5.0976 - acc: 0.0079 - ETA: 251s - loss: 5.0953 - acc: 0.0090 - ETA: 250s - loss: 5.0921 - acc: 0.0095 - ETA: 249s - loss: 5.0903 - acc: 0.0094 - ETA: 248s - loss: 5.0881 - acc: 0.0093 - ETA: 247s - loss: 5.0855 - acc: 0.0092 - ETA: 246s - loss: 5.0832 - acc: 0.0097 - ETA: 245s - loss: 5.0809 - acc: 0.0096 - ETA: 244s - loss: 5.0790 - acc: 0.0094 - ETA: 243s - loss: 5.0770 - acc: 0.0093 - ETA: 242s - loss: 5.0748 - acc: 0.0092 - ETA: 241s - loss: 5.0725 - acc: 0.0091 - ETA: 240s - loss: 5.0704 - acc: 0.0090 - ETA: 239s - loss: 5.0683 - acc: 0.0089 - ETA: 238s - loss: 5.0664 - acc: 0.0089 - ETA: 237s - loss: 5.0649 - acc: 0.0088 - ETA: 236s - loss: 5.0631 - acc: 0.0087 - ETA: 235s - loss: 5.0606 - acc: 0.0086 - ETA: 234s - loss: 5.0577 - acc: 0.0085 - ETA: 233s - loss: 5.0573 - acc: 0.0094 - ETA: 232s - loss: 5.0555 - acc: 0.0093 - ETA: 231s - loss: 5.0543 - acc: 0.0092 - ETA: 230s - loss: 5.0532 - acc: 0.0091 - ETA: 229s - loss: 5.0512 - acc: 0.0090 - ETA: 228s - loss: 5.0497 - acc: 0.0090 - ETA: 227s - loss: 5.0482 - acc: 0.0098 - ETA: 226s - loss: 5.0466 - acc: 0.0097 - ETA: 225s - loss: 5.0451 - acc: 0.0096 - ETA: 224s - loss: 5.0438 - acc: 0.0095 - ETA: 223s - loss: 5.0425 - acc: 0.0099 - ETA: 222s - loss: 5.0408 - acc: 0.0098 - ETA: 221s - loss: 5.0393 - acc: 0.0097 - ETA: 220s - loss: 5.0380 - acc: 0.0096 - ETA: 219s - loss: 5.0366 - acc: 0.0096 - ETA: 218s - loss: 5.0347 - acc: 0.0095 - ETA: 217s - loss: 5.0325 - acc: 0.0098 - ETA: 216s - loss: 5.0320 - acc: 0.0097 - ETA: 215s - loss: 5.0305 - acc: 0.0101 - ETA: 214s - loss: 5.0295 - acc: 0.0100 - ETA: 213s - loss: 5.0284 - acc: 0.0099 - ETA: 212s - loss: 5.0269 - acc: 0.0102 - ETA: 211s - loss: 5.0251 - acc: 0.0106 - ETA: 210s - loss: 5.0248 - acc: 0.0105 - ETA: 209s - loss: 5.0236 - acc: 0.0108 - ETA: 208s - loss: 5.0227 - acc: 0.0107 - ETA: 207s - loss: 5.0218 - acc: 0.0106 - ETA: 206s - loss: 5.0203 - acc: 0.0105 - ETA: 205s - loss: 5.0191 - acc: 0.0105 - ETA: 204s - loss: 5.0183 - acc: 0.0104 - ETA: 203s - loss: 5.0170 - acc: 0.0103 - ETA: 202s - loss: 5.0156 - acc: 0.0106 - ETA: 201s - loss: 5.0154 - acc: 0.0105 - ETA: 200s - loss: 5.0143 - acc: 0.0104 - ETA: 199s - loss: 5.0132 - acc: 0.0104 - ETA: 198s - loss: 5.0119 - acc: 0.0107 - ETA: 197s - loss: 5.0112 - acc: 0.0106 - ETA: 196s - loss: 5.0101 - acc: 0.0105 - ETA: 195s - loss: 5.0098 - acc: 0.0104 - ETA: 194s - loss: 5.0087 - acc: 0.0104 - ETA: 193s - loss: 5.0080 - acc: 0.0103 - ETA: 192s - loss: 5.0073 - acc: 0.0102 - ETA: 191s - loss: 5.0063 - acc: 0.0105 - ETA: 190s - loss: 5.0052 - acc: 0.0104 - ETA: 189s - loss: 5.0041 - acc: 0.0103 - ETA: 188s - loss: 5.0033 - acc: 0.0103 - ETA: 187s - loss: 5.0022 - acc: 0.0102 - ETA: 186s - loss: 5.0014 - acc: 0.0101 - ETA: 185s - loss: 5.0005 - acc: 0.0101 - ETA: 184s - loss: 5.0001 - acc: 0.0100 - ETA: 183s - loss: 4.9988 - acc: 0.0099 - ETA: 183s - loss: 4.9983 - acc: 0.0099 - ETA: 182s - loss: 4.9977 - acc: 0.0098 - ETA: 181s - loss: 4.9972 - acc: 0.0097 - ETA: 180s - loss: 4.9963 - acc: 0.0097 - ETA: 179s - loss: 4.9954 - acc: 0.0099 - ETA: 178s - loss: 4.9945 - acc: 0.0099 - ETA: 177s - loss: 4.9938 - acc: 0.0098 - ETA: 176s - loss: 4.9924 - acc: 0.0097 - ETA: 175s - loss: 4.9920 - acc: 0.0097 - ETA: 174s - loss: 4.9914 - acc: 0.0099 - ETA: 173s - loss: 4.9903 - acc: 0.0099 - ETA: 172s - loss: 4.9893 - acc: 0.0101 - ETA: 171s - loss: 4.9888 - acc: 0.0101 - ETA: 170s - loss: 4.9880 - acc: 0.0100 - ETA: 169s - loss: 4.9869 - acc: 0.0099 - ETA: 168s - loss: 4.9864 - acc: 0.0102 - ETA: 167s - loss: 4.9852 - acc: 0.0101 - ETA: 166s - loss: 4.9849 - acc: 0.0101 - ETA: 165s - loss: 4.9842 - acc: 0.0100 - ETA: 164s - loss: 4.9834 - acc: 0.0099 - ETA: 163s - loss: 4.9831 - acc: 0.0099 - ETA: 162s - loss: 4.9824 - acc: 0.0098 - ETA: 161s - loss: 4.9816 - acc: 0.0101 - ETA: 160s - loss: 4.9808 - acc: 0.0100 - ETA: 159s - loss: 4.9797 - acc: 0.0099 - ETA: 158s - loss: 4.9790 - acc: 0.0099 - ETA: 157s - loss: 4.9779 - acc: 0.0098 - ETA: 156s - loss: 4.9773 - acc: 0.0101 - ETA: 155s - loss: 4.9764 - acc: 0.0100 - ETA: 154s - loss: 4.9758 - acc: 0.0099 - ETA: 153s - loss: 4.9750 - acc: 0.0102 - ETA: 152s - loss: 4.9746 - acc: 0.0101 - ETA: 151s - loss: 4.9741 - acc: 0.0101 - ETA: 150s - loss: 4.9739 - acc: 0.0100 - ETA: 149s - loss: 4.9733 - acc: 0.0099 - ETA: 148s - loss: 4.9731 - acc: 0.0102 - ETA: 147s - loss: 4.9720 - acc: 0.0101 - ETA: 146s - loss: 4.9716 - acc: 0.0101 - ETA: 145s - loss: 4.9712 - acc: 0.0100 - ETA: 144s - loss: 4.9710 - acc: 0.0099 - ETA: 143s - loss: 4.9705 - acc: 0.0102 - ETA: 142s - loss: 4.9694 - acc: 0.0101 - ETA: 141s - loss: 4.9685 - acc: 0.0101 - ETA: 140s - loss: 4.9675 - acc: 0.0100 - ETA: 139s - loss: 4.9672 - acc: 0.0102 - ETA: 138s - loss: 4.9660 - acc: 0.0102 - ETA: 137s - loss: 4.9653 - acc: 0.0101 - ETA: 136s - loss: 4.9650 - acc: 0.0103 - ETA: 135s - loss: 4.9640 - acc: 0.0108 - ETA: 134s - loss: 4.9635 - acc: 0.0107 - ETA: 133s - loss: 4.9628 - acc: 0.0106 - ETA: 132s - loss: 4.9624 - acc: 0.0106 - ETA: 131s - loss: 4.9614 - acc: 0.0110 - ETA: 130s - loss: 4.9606 - acc: 0.0110 - ETA: 129s - loss: 4.9605 - acc: 0.0112 - ETA: 128s - loss: 4.9596 - acc: 0.0111 - ETA: 127s - loss: 4.9598 - acc: 0.0113 - ETA: 126s - loss: 4.9590 - acc: 0.0112 - ETA: 125s - loss: 4.9578 - acc: 0.0112 - ETA: 124s - loss: 4.9577 - acc: 0.0111 - ETA: 123s - loss: 4.9570 - acc: 0.0111 - ETA: 122s - loss: 4.9562 - acc: 0.0110 - ETA: 121s - loss: 4.9557 - acc: 0.0110 - ETA: 120s - loss: 4.9551 - acc: 0.0109 - ETA: 119s - loss: 4.9548 - acc: 0.0111 - ETA: 118s - loss: 4.9538 - acc: 0.0111 - ETA: 117s - loss: 4.9535 - acc: 0.0112 - ETA: 116s - loss: 4.9527 - acc: 0.0112 - ETA: 115s - loss: 4.9516 - acc: 0.0114 - ETA: 114s - loss: 4.9520 - acc: 0.0113 - ETA: 113s - loss: 4.9516 - acc: 0.0115 - ETA: 112s - loss: 4.9513 - acc: 0.0114 - ETA: 111s - loss: 4.9510 - acc: 0.0114 - ETA: 110s - loss: 4.9503 - acc: 0.0118 - ETA: 109s - loss: 4.9494 - acc: 0.0117 - ETA: 108s - loss: 4.9486 - acc: 0.0117 - ETA: 107s - loss: 4.9484 - acc: 0.0116 - ETA: 106s - loss: 4.9479 - acc: 0.0118 - ETA: 105s - loss: 4.9476 - acc: 0.0117 - ETA: 104s - loss: 4.9470 - acc: 0.0117 - ETA: 103s - loss: 4.9460 - acc: 0.0119 - ETA: 102s - loss: 4.9453 - acc: 0.0118 - ETA: 101s - loss: 4.9442 - acc: 0.0118 - ETA: 100s - loss: 4.9434 - acc: 0.0119 - ETA: 99s - loss: 4.9418 - acc: 0.0121  - ETA: 98s - loss: 4.9413 - acc: 0.0120 - ETA: 97s - loss: 4.9403 - acc: 0.0120 - ETA: 96s - loss: 4.9400 - acc: 0.0119 - ETA: 95s - loss: 4.9393 - acc: 0.0119 - ETA: 94s - loss: 4.9383 - acc: 0.0118 - ETA: 93s - loss: 4.9381 - acc: 0.0118 - ETA: 92s - loss: 4.9372 - acc: 0.0119 - ETA: 91s - loss: 4.9370 - acc: 0.0119 - ETA: 90s - loss: 4.9365 - acc: 0.0118 - ETA: 89s - loss: 4.9355 - acc: 0.0118 - ETA: 88s - loss: 4.9343 - acc: 0.0117 - ETA: 87s - loss: 4.9340 - acc: 0.0117 - ETA: 86s - loss: 4.9341 - acc: 0.0116 - ETA: 85s - loss: 4.9335 - acc: 0.0116 - ETA: 83s - loss: 4.9320 - acc: 0.0118 - ETA: 82s - loss: 4.9317 - acc: 0.0117 - ETA: 81s - loss: 4.9321 - acc: 0.0117 - ETA: 80s - loss: 4.9314 - acc: 0.0116 - ETA: 79s - loss: 4.9317 - acc: 0.0116 - ETA: 78s - loss: 4.9307 - acc: 0.0115 - ETA: 77s - loss: 4.9303 - acc: 0.0115 - ETA: 76s - loss: 4.9295 - acc: 0.0116 - ETA: 75s - loss: 4.9288 - acc: 0.0116 - ETA: 74s - loss: 4.9276 - acc: 0.0115 - ETA: 73s - loss: 4.9270 - acc: 0.0115 - ETA: 72s - loss: 4.9260 - acc: 0.0115 - ETA: 71s - loss: 4.9252 - acc: 0.0114 - ETA: 70s - loss: 4.9242 - acc: 0.0114 - ETA: 69s - loss: 4.9230 - acc: 0.0115 - ETA: 68s - loss: 4.9230 - acc: 0.0115 - ETA: 67s - loss: 4.9223 - acc: 0.0116 - ETA: 66s - loss: 4.9213 - acc: 0.0119 - ETA: 65s - loss: 4.9215 - acc: 0.0121 - ETA: 64s - loss: 4.9218 - acc: 0.0122 - ETA: 63s - loss: 4.9212 - acc: 0.0122 - ETA: 62s - loss: 4.9204 - acc: 0.0121 - ETA: 61s - loss: 4.9201 - acc: 0.0121 - ETA: 60s - loss: 4.9194 - acc: 0.0120 - ETA: 59s - loss: 4.9200 - acc: 0.0120 - ETA: 58s - loss: 4.9194 - acc: 0.0120 - ETA: 57s - loss: 4.9180 - acc: 0.0119 - ETA: 56s - loss: 4.9188 - acc: 0.0119 - ETA: 55s - loss: 4.9179 - acc: 0.0118 - ETA: 54s - loss: 4.9172 - acc: 0.0120 - ETA: 53s - loss: 4.9162 - acc: 0.0119 - ETA: 52s - loss: 4.9155 - acc: 0.0121 - ETA: 51s - loss: 4.9147 - acc: 0.0120 - ETA: 50s - loss: 4.9139 - acc: 0.0120 - ETA: 49s - loss: 4.9130 - acc: 0.0119 - ETA: 48s - loss: 4.9113 - acc: 0.0121 - ETA: 47s - loss: 4.9108 - acc: 0.0120 - ETA: 46s - loss: 4.9107 - acc: 0.0120 - ETA: 45s - loss: 4.9099 - acc: 0.0119 - ETA: 44s - loss: 4.9096 - acc: 0.0121 - ETA: 43s - loss: 4.9090 - acc: 0.0124 - ETA: 42s - loss: 4.9085 - acc: 0.0123 - ETA: 41s - loss: 4.9076 - acc: 0.0126 - ETA: 40s - loss: 4.9068 - acc: 0.0126 - ETA: 39s - loss: 4.9058 - acc: 0.0125 - ETA: 38s - loss: 4.9053 - acc: 0.0127 - ETA: 37s - loss: 4.9046 - acc: 0.0128 - ETA: 36s - loss: 4.9036 - acc: 0.0128 - ETA: 35s - loss: 4.9034 - acc: 0.0127 - ETA: 34s - loss: 4.9029 - acc: 0.0127 - ETA: 33s - loss: 4.9024 - acc: 0.0128 - ETA: 32s - loss: 4.9030 - acc: 0.0127 - ETA: 31s - loss: 4.9027 - acc: 0.0127 - ETA: 30s - loss: 4.9015 - acc: 0.0130 - ETA: 29s - loss: 4.9006 - acc: 0.0131 - ETA: 28s - loss: 4.9002 - acc: 0.0132 - ETA: 27s - loss: 4.9004 - acc: 0.0132 - ETA: 26s - loss: 4.9000 - acc: 0.0131 - ETA: 25s - loss: 4.8993 - acc: 0.0133 - ETA: 24s - loss: 4.8986 - acc: 0.0134 - ETA: 23s - loss: 4.8981 - acc: 0.0135 - ETA: 22s - loss: 4.8974 - acc: 0.0136 - ETA: 21s - loss: 4.8974 - acc: 0.0136 - ETA: 20s - loss: 4.8964 - acc: 0.0137 - ETA: 19s - loss: 4.8959 - acc: 0.0137 - ETA: 18s - loss: 4.8950 - acc: 0.0136 - ETA: 17s - loss: 4.8942 - acc: 0.0136 - ETA: 16s - loss: 4.8931 - acc: 0.0137 - ETA: 15s - loss: 4.8923 - acc: 0.0136 - ETA: 14s - loss: 4.8919 - acc: 0.0138 - ETA: 13s - loss: 4.8914 - acc: 0.0137 - ETA: 12s - loss: 4.8908 - acc: 0.0138 - ETA: 11s - loss: 4.8896 - acc: 0.0139 - ETA: 10s - loss: 4.8889 - acc: 0.0139 - ETA: 9s - loss: 4.8889 - acc: 0.0138  - ETA: 8s - loss: 4.8884 - acc: 0.0138 - ETA: 7s - loss: 4.8878 - acc: 0.0139 - ETA: 6s - loss: 4.8875 - acc: 0.0140 - ETA: 5s - loss: 4.8866 - acc: 0.0140 - ETA: 4s - loss: 4.8855 - acc: 0.0139 - ETA: 3s - loss: 4.8855 - acc: 0.0139 - ETA: 2s - loss: 4.8845 - acc: 0.0140 - ETA: 1s - loss: 4.8842 - acc: 0.0140Epoch 00000: val_loss improved from inf to 4.61134, saving model to saved_models/weights.best.from_scratch.hdf5
6680/6680 [==============================] - 347s - loss: 4.8840 - acc: 0.0141 - val_loss: 4.6113 - val_acc: 0.0431
Epoch 2/5
6660/6680 [============================>.] - ETA: 325s - loss: 4.8560 - acc: 0.0500 - ETA: 324s - loss: 4.6930 - acc: 0.0250 - ETA: 325s - loss: 4.6529 - acc: 0.0500 - ETA: 324s - loss: 4.6335 - acc: 0.0500 - ETA: 324s - loss: 4.6303 - acc: 0.0400 - ETA: 323s - loss: 4.6547 - acc: 0.0417 - ETA: 322s - loss: 4.6602 - acc: 0.0429 - ETA: 322s - loss: 4.6626 - acc: 0.0438 - ETA: 322s - loss: 4.6405 - acc: 0.0389 - ETA: 321s - loss: 4.6364 - acc: 0.0350 - ETA: 320s - loss: 4.6321 - acc: 0.0364 - ETA: 320s - loss: 4.6155 - acc: 0.0417 - ETA: 320s - loss: 4.6181 - acc: 0.0423 - ETA: 319s - loss: 4.6155 - acc: 0.0393 - ETA: 318s - loss: 4.6130 - acc: 0.0433 - ETA: 317s - loss: 4.6181 - acc: 0.0438 - ETA: 316s - loss: 4.6022 - acc: 0.0412 - ETA: 314s - loss: 4.6106 - acc: 0.0389 - ETA: 313s - loss: 4.6134 - acc: 0.0421 - ETA: 312s - loss: 4.6060 - acc: 0.0475 - ETA: 311s - loss: 4.6080 - acc: 0.0452 - ETA: 310s - loss: 4.6012 - acc: 0.0477 - ETA: 309s - loss: 4.6013 - acc: 0.0478 - ETA: 308s - loss: 4.6037 - acc: 0.0458 - ETA: 307s - loss: 4.5981 - acc: 0.0460 - ETA: 306s - loss: 4.5965 - acc: 0.0442 - ETA: 305s - loss: 4.5918 - acc: 0.0444 - ETA: 304s - loss: 4.5912 - acc: 0.0429 - ETA: 303s - loss: 4.5790 - acc: 0.0414 - ETA: 302s - loss: 4.5870 - acc: 0.0400 - ETA: 301s - loss: 4.5923 - acc: 0.0403 - ETA: 300s - loss: 4.5900 - acc: 0.0406 - ETA: 299s - loss: 4.5827 - acc: 0.0394 - ETA: 298s - loss: 4.5869 - acc: 0.0397 - ETA: 297s - loss: 4.5894 - acc: 0.0400 - ETA: 296s - loss: 4.5864 - acc: 0.0403 - ETA: 295s - loss: 4.5868 - acc: 0.0405 - ETA: 295s - loss: 4.5839 - acc: 0.0421 - ETA: 294s - loss: 4.5836 - acc: 0.0410 - ETA: 293s - loss: 4.5834 - acc: 0.0413 - ETA: 292s - loss: 4.5820 - acc: 0.0415 - ETA: 291s - loss: 4.5843 - acc: 0.0405 - ETA: 290s - loss: 4.5865 - acc: 0.0419 - ETA: 289s - loss: 4.5884 - acc: 0.0409 - ETA: 288s - loss: 4.5867 - acc: 0.0400 - ETA: 287s - loss: 4.5873 - acc: 0.0391 - ETA: 286s - loss: 4.5868 - acc: 0.0404 - ETA: 285s - loss: 4.5841 - acc: 0.0406 - ETA: 284s - loss: 4.5799 - acc: 0.0408 - ETA: 283s - loss: 4.5773 - acc: 0.0440 - ETA: 282s - loss: 4.5728 - acc: 0.0451 - ETA: 281s - loss: 4.5731 - acc: 0.0442 - ETA: 280s - loss: 4.5683 - acc: 0.0434 - ETA: 279s - loss: 4.5659 - acc: 0.0426 - ETA: 278s - loss: 4.5639 - acc: 0.0427 - ETA: 277s - loss: 4.5601 - acc: 0.0429 - ETA: 276s - loss: 4.5605 - acc: 0.0421 - ETA: 276s - loss: 4.5595 - acc: 0.0422 - ETA: 275s - loss: 4.5633 - acc: 0.0424 - ETA: 274s - loss: 4.5637 - acc: 0.0433 - ETA: 273s - loss: 4.5599 - acc: 0.0426 - ETA: 271s - loss: 4.5539 - acc: 0.0435 - ETA: 270s - loss: 4.5578 - acc: 0.0429 - ETA: 270s - loss: 4.5546 - acc: 0.0430 - ETA: 269s - loss: 4.5563 - acc: 0.0431 - ETA: 268s - loss: 4.5584 - acc: 0.0424 - ETA: 267s - loss: 4.5601 - acc: 0.0418 - ETA: 266s - loss: 4.5630 - acc: 0.0412 - ETA: 265s - loss: 4.5599 - acc: 0.0413 - ETA: 264s - loss: 4.5624 - acc: 0.0407 - ETA: 264s - loss: 4.5606 - acc: 0.0401 - ETA: 263s - loss: 4.5628 - acc: 0.0403 - ETA: 262s - loss: 4.5609 - acc: 0.0397 - ETA: 261s - loss: 4.5623 - acc: 0.0392 - ETA: 260s - loss: 4.5640 - acc: 0.0393 - ETA: 259s - loss: 4.5640 - acc: 0.0401 - ETA: 258s - loss: 4.5621 - acc: 0.0396 - ETA: 257s - loss: 4.5625 - acc: 0.0397 - ETA: 256s - loss: 4.5614 - acc: 0.0392 - ETA: 255s - loss: 4.5592 - acc: 0.0400 - ETA: 254s - loss: 4.5574 - acc: 0.0407 - ETA: 253s - loss: 4.5603 - acc: 0.0409 - ETA: 252s - loss: 4.5613 - acc: 0.0404 - ETA: 251s - loss: 4.5622 - acc: 0.0399 - ETA: 250s - loss: 4.5607 - acc: 0.0406 - ETA: 249s - loss: 4.5608 - acc: 0.0401 - ETA: 248s - loss: 4.5593 - acc: 0.0397 - ETA: 247s - loss: 4.5586 - acc: 0.0398 - ETA: 246s - loss: 4.5566 - acc: 0.0399 - ETA: 245s - loss: 4.5544 - acc: 0.0394 - ETA: 244s - loss: 4.5581 - acc: 0.0390 - ETA: 242s - loss: 4.5594 - acc: 0.0397 - ETA: 241s - loss: 4.5580 - acc: 0.0398 - ETA: 240s - loss: 4.5566 - acc: 0.0394 - ETA: 239s - loss: 4.5598 - acc: 0.0395 - ETA: 238s - loss: 4.5588 - acc: 0.0401 - ETA: 237s - loss: 4.5598 - acc: 0.0402 - ETA: 236s - loss: 4.5596 - acc: 0.0403 - ETA: 235s - loss: 4.5608 - acc: 0.0399 - ETA: 234s - loss: 4.5617 - acc: 0.0400 - ETA: 233s - loss: 4.5613 - acc: 0.0396 - ETA: 232s - loss: 4.5649 - acc: 0.0392 - ETA: 231s - loss: 4.5657 - acc: 0.0388 - ETA: 230s - loss: 4.5670 - acc: 0.0389 - ETA: 229s - loss: 4.5696 - acc: 0.0390 - ETA: 228s - loss: 4.5704 - acc: 0.0392 - ETA: 227s - loss: 4.5726 - acc: 0.0388 - ETA: 226s - loss: 4.5719 - acc: 0.0389 - ETA: 225s - loss: 4.5704 - acc: 0.0404 - ETA: 224s - loss: 4.5688 - acc: 0.0409 - ETA: 223s - loss: 4.5658 - acc: 0.0414 - ETA: 222s - loss: 4.5627 - acc: 0.0420 - ETA: 221s - loss: 4.5618 - acc: 0.0420 - ETA: 220s - loss: 4.5621 - acc: 0.0421 - ETA: 219s - loss: 4.5591 - acc: 0.0426 - ETA: 218s - loss: 4.5588 - acc: 0.0422 - ETA: 217s - loss: 4.5605 - acc: 0.0432 - ETA: 216s - loss: 4.5601 - acc: 0.0436 - ETA: 215s - loss: 4.5601 - acc: 0.0433 - ETA: 214s - loss: 4.5587 - acc: 0.0433 - ETA: 213s - loss: 4.5569 - acc: 0.0434 - ETA: 212s - loss: 4.5542 - acc: 0.0434 - ETA: 211s - loss: 4.5535 - acc: 0.0431 - ETA: 210s - loss: 4.5523 - acc: 0.0427 - ETA: 209s - loss: 4.5538 - acc: 0.0424 - ETA: 208s - loss: 4.5512 - acc: 0.0421 - ETA: 208s - loss: 4.5530 - acc: 0.0417 - ETA: 207s - loss: 4.5518 - acc: 0.0418 - ETA: 206s - loss: 4.5504 - acc: 0.0415 - ETA: 205s - loss: 4.5507 - acc: 0.0412 - ETA: 204s - loss: 4.5486 - acc: 0.0412 - ETA: 203s - loss: 4.5475 - acc: 0.0413 - ETA: 202s - loss: 4.5486 - acc: 0.0414 - ETA: 201s - loss: 4.5472 - acc: 0.0414 - ETA: 200s - loss: 4.5437 - acc: 0.0422 - ETA: 199s - loss: 4.5443 - acc: 0.0423 - ETA: 197s - loss: 4.5442 - acc: 0.0423 - ETA: 196s - loss: 4.5449 - acc: 0.0424 - ETA: 195s - loss: 4.5465 - acc: 0.0421 - ETA: 194s - loss: 4.5446 - acc: 0.0418 - ETA: 193s - loss: 4.5429 - acc: 0.0422 - ETA: 192s - loss: 4.5411 - acc: 0.0426 - ETA: 191s - loss: 4.5405 - acc: 0.0423 - ETA: 190s - loss: 4.5387 - acc: 0.0427 - ETA: 190s - loss: 4.5365 - acc: 0.0424 - ETA: 189s - loss: 4.5345 - acc: 0.0425 - ETA: 188s - loss: 4.5337 - acc: 0.0422 - ETA: 187s - loss: 4.5343 - acc: 0.0419 - ETA: 186s - loss: 4.5353 - acc: 0.0416 - ETA: 185s - loss: 4.5364 - acc: 0.0420 - ETA: 184s - loss: 4.5358 - acc: 0.0421 - ETA: 183s - loss: 4.5364 - acc: 0.0418 - ETA: 182s - loss: 4.5348 - acc: 0.0422 - ETA: 181s - loss: 4.5318 - acc: 0.0419 - ETA: 180s - loss: 4.5290 - acc: 0.0419 - ETA: 179s - loss: 4.5283 - acc: 0.0417 - ETA: 178s - loss: 4.5276 - acc: 0.0414 - ETA: 177s - loss: 4.5266 - acc: 0.0418 - ETA: 176s - loss: 4.5261 - acc: 0.0425 - ETA: 175s - loss: 4.5251 - acc: 0.0428 - ETA: 174s - loss: 4.5226 - acc: 0.0432 - ETA: 173s - loss: 4.5222 - acc: 0.0432 - ETA: 172s - loss: 4.5224 - acc: 0.0439 - ETA: 170s - loss: 4.5223 - acc: 0.0442 - ETA: 169s - loss: 4.5213 - acc: 0.0448 - ETA: 168s - loss: 4.5204 - acc: 0.0446 - ETA: 167s - loss: 4.5209 - acc: 0.0443 - ETA: 166s - loss: 4.5193 - acc: 0.0443 - ETA: 165s - loss: 4.5207 - acc: 0.0441 - ETA: 164s - loss: 4.5197 - acc: 0.0438 - ETA: 163s - loss: 4.5186 - acc: 0.0436 - ETA: 162s - loss: 4.5166 - acc: 0.0439 - ETA: 161s - loss: 4.5172 - acc: 0.0436 - ETA: 160s - loss: 4.5145 - acc: 0.0443 - ETA: 159s - loss: 4.5142 - acc: 0.0443 - ETA: 158s - loss: 4.5144 - acc: 0.0443 - ETA: 157s - loss: 4.5123 - acc: 0.0444 - ETA: 156s - loss: 4.5121 - acc: 0.0441 - ETA: 155s - loss: 4.5114 - acc: 0.0439 - ETA: 154s - loss: 4.5120 - acc: 0.0436 - ETA: 153s - loss: 4.5119 - acc: 0.0442 - ETA: 152s - loss: 4.5102 - acc: 0.0448 - ETA: 151s - loss: 4.5113 - acc: 0.0445 - ETA: 150s - loss: 4.5094 - acc: 0.0448 - ETA: 149s - loss: 4.5084 - acc: 0.0446 - ETA: 148s - loss: 4.5075 - acc: 0.0446 - ETA: 147s - loss: 4.5068 - acc: 0.0444 - ETA: 146s - loss: 4.5067 - acc: 0.0441 - ETA: 145s - loss: 4.5075 - acc: 0.0444 - ETA: 144s - loss: 4.5078 - acc: 0.0442 - ETA: 143s - loss: 4.5058 - acc: 0.0442 - ETA: 142s - loss: 4.5045 - acc: 0.0440 - ETA: 141s - loss: 4.5046 - acc: 0.0440 - ETA: 140s - loss: 4.5053 - acc: 0.0441 - ETA: 139s - loss: 4.5039 - acc: 0.0441 - ETA: 138s - loss: 4.5024 - acc: 0.0439 - ETA: 137s - loss: 4.5028 - acc: 0.0439 - ETA: 136s - loss: 4.5025 - acc: 0.0437 - ETA: 135s - loss: 4.5008 - acc: 0.0440 - ETA: 134s - loss: 4.5001 - acc: 0.0443 - ETA: 133s - loss: 4.5016 - acc: 0.0443 - ETA: 132s - loss: 4.5009 - acc: 0.0448 - ETA: 131s - loss: 4.5000 - acc: 0.0446 - ETA: 130s - loss: 4.4972 - acc: 0.0451 - ETA: 129s - loss: 4.4965 - acc: 0.0449 - ETA: 128s - loss: 4.4962 - acc: 0.0451 - ETA: 127s - loss: 4.4946 - acc: 0.0452 - ETA: 126s - loss: 4.4946 - acc: 0.0452 - ETA: 125s - loss: 4.4951 - acc: 0.0450 - ETA: 124s - loss: 4.4939 - acc: 0.0448 - ETA: 123s - loss: 4.4923 - acc: 0.0448 - ETA: 122s - loss: 4.4914 - acc: 0.0455 - ETA: 121s - loss: 4.4914 - acc: 0.0455 - ETA: 120s - loss: 4.4927 - acc: 0.0456 - ETA: 119s - loss: 4.4926 - acc: 0.0453 - ETA: 118s - loss: 4.4922 - acc: 0.0456 - ETA: 117s - loss: 4.4922 - acc: 0.0456 - ETA: 116s - loss: 4.4913 - acc: 0.0454 - ETA: 115s - loss: 4.4928 - acc: 0.0452 - ETA: 114s - loss: 4.4934 - acc: 0.0450 - ETA: 113s - loss: 4.4934 - acc: 0.0450 - ETA: 112s - loss: 4.4922 - acc: 0.0450 - ETA: 111s - loss: 4.4915 - acc: 0.0448 - ETA: 110s - loss: 4.4917 - acc: 0.0446 - ETA: 109s - loss: 4.4920 - acc: 0.0451 - ETA: 108s - loss: 4.4914 - acc: 0.0451 - ETA: 107s - loss: 4.4912 - acc: 0.0449 - ETA: 106s - loss: 4.4922 - acc: 0.0447 - ETA: 105s - loss: 4.4904 - acc: 0.0452 - ETA: 104s - loss: 4.4907 - acc: 0.0452 - ETA: 103s - loss: 4.4910 - acc: 0.0452 - ETA: 102s - loss: 4.4903 - acc: 0.0450 - ETA: 101s - loss: 4.4905 - acc: 0.0453 - ETA: 100s - loss: 4.4892 - acc: 0.0457 - ETA: 99s - loss: 4.4904 - acc: 0.0455  - ETA: 98s - loss: 4.4906 - acc: 0.0456 - ETA: 97s - loss: 4.4899 - acc: 0.0460 - ETA: 96s - loss: 4.4881 - acc: 0.0464 - ETA: 95s - loss: 4.4882 - acc: 0.0469 - ETA: 94s - loss: 4.4867 - acc: 0.0471 - ETA: 93s - loss: 4.4866 - acc: 0.0473 - ETA: 92s - loss: 4.4862 - acc: 0.0471 - ETA: 91s - loss: 4.4875 - acc: 0.0471 - ETA: 90s - loss: 4.4873 - acc: 0.0473 - ETA: 89s - loss: 4.4871 - acc: 0.0476 - ETA: 88s - loss: 4.4863 - acc: 0.0476 - ETA: 87s - loss: 4.4848 - acc: 0.0478 - ETA: 86s - loss: 4.4857 - acc: 0.0478 - ETA: 85s - loss: 4.4849 - acc: 0.0478 - ETA: 84s - loss: 4.4844 - acc: 0.0478 - ETA: 83s - loss: 4.4843 - acc: 0.0476 - ETA: 82s - loss: 4.4837 - acc: 0.0476 - ETA: 81s - loss: 4.4828 - acc: 0.0476 - ETA: 80s - loss: 4.4836 - acc: 0.0476 - ETA: 79s - loss: 4.4821 - acc: 0.0478 - ETA: 78s - loss: 4.4822 - acc: 0.0477 - ETA: 77s - loss: 4.4812 - acc: 0.0477 - ETA: 76s - loss: 4.4799 - acc: 0.0477 - ETA: 75s - loss: 4.4808 - acc: 0.0475 - ETA: 74s - loss: 4.4812 - acc: 0.0473 - ETA: 73s - loss: 4.4814 - acc: 0.0471 - ETA: 72s - loss: 4.4806 - acc: 0.0475 - ETA: 71s - loss: 4.4792 - acc: 0.0479 - ETA: 70s - loss: 4.4785 - acc: 0.0479 - ETA: 69s - loss: 4.4778 - acc: 0.0481 - ETA: 68s - loss: 4.4786 - acc: 0.0479 - ETA: 67s - loss: 4.4783 - acc: 0.0479 - ETA: 66s - loss: 4.4778 - acc: 0.0483 - ETA: 65s - loss: 4.4773 - acc: 0.0483 - ETA: 64s - loss: 4.4767 - acc: 0.0481 - ETA: 63s - loss: 4.4747 - acc: 0.0482 - ETA: 62s - loss: 4.4740 - acc: 0.0483 - ETA: 61s - loss: 4.4732 - acc: 0.0482 - ETA: 60s - loss: 4.4730 - acc: 0.0480 - ETA: 59s - loss: 4.4713 - acc: 0.0480 - ETA: 58s - loss: 4.4696 - acc: 0.0478 - ETA: 57s - loss: 4.4706 - acc: 0.0477 - ETA: 56s - loss: 4.4714 - acc: 0.0477 - ETA: 55s - loss: 4.4700 - acc: 0.0477 - ETA: 54s - loss: 4.4715 - acc: 0.0475 - ETA: 53s - loss: 4.4712 - acc: 0.0475 - ETA: 52s - loss: 4.4714 - acc: 0.0473 - ETA: 51s - loss: 4.4703 - acc: 0.0475 - ETA: 50s - loss: 4.4699 - acc: 0.0475 - ETA: 49s - loss: 4.4688 - acc: 0.0474 - ETA: 48s - loss: 4.4696 - acc: 0.0474 - ETA: 47s - loss: 4.4699 - acc: 0.0472 - ETA: 46s - loss: 4.4683 - acc: 0.0472 - ETA: 45s - loss: 4.4674 - acc: 0.0474 - ETA: 44s - loss: 4.4668 - acc: 0.0474 - ETA: 43s - loss: 4.4670 - acc: 0.0476 - ETA: 42s - loss: 4.4670 - acc: 0.0474 - ETA: 41s - loss: 4.4676 - acc: 0.0473 - ETA: 40s - loss: 4.4668 - acc: 0.0474 - ETA: 39s - loss: 4.4656 - acc: 0.0476 - ETA: 38s - loss: 4.4651 - acc: 0.0476 - ETA: 37s - loss: 4.4654 - acc: 0.0476 - ETA: 36s - loss: 4.4640 - acc: 0.0478 - ETA: 35s - loss: 4.4625 - acc: 0.0477 - ETA: 34s - loss: 4.4622 - acc: 0.0477 - ETA: 33s - loss: 4.4633 - acc: 0.0478 - ETA: 32s - loss: 4.4640 - acc: 0.0477 - ETA: 31s - loss: 4.4632 - acc: 0.0477 - ETA: 30s - loss: 4.4629 - acc: 0.0477 - ETA: 29s - loss: 4.4630 - acc: 0.0477 - ETA: 28s - loss: 4.4629 - acc: 0.0479 - ETA: 27s - loss: 4.4616 - acc: 0.0480 - ETA: 26s - loss: 4.4634 - acc: 0.0479 - ETA: 25s - loss: 4.4627 - acc: 0.0477 - ETA: 24s - loss: 4.4622 - acc: 0.0477 - ETA: 23s - loss: 4.4614 - acc: 0.0477 - ETA: 22s - loss: 4.4621 - acc: 0.0476 - ETA: 21s - loss: 4.4622 - acc: 0.0476 - ETA: 20s - loss: 4.4611 - acc: 0.0475 - ETA: 19s - loss: 4.4610 - acc: 0.0475 - ETA: 18s - loss: 4.4605 - acc: 0.0473 - ETA: 17s - loss: 4.4588 - acc: 0.0473 - ETA: 16s - loss: 4.4594 - acc: 0.0473 - ETA: 15s - loss: 4.4603 - acc: 0.0472 - ETA: 14s - loss: 4.4582 - acc: 0.0475 - ETA: 13s - loss: 4.4579 - acc: 0.0474 - ETA: 12s - loss: 4.4578 - acc: 0.0474 - ETA: 11s - loss: 4.4580 - acc: 0.0472 - ETA: 10s - loss: 4.4568 - acc: 0.0474 - ETA: 9s - loss: 4.4551 - acc: 0.0474  - ETA: 8s - loss: 4.4544 - acc: 0.0475 - ETA: 7s - loss: 4.4536 - acc: 0.0477 - ETA: 6s - loss: 4.4526 - acc: 0.0477 - ETA: 5s - loss: 4.4529 - acc: 0.0477 - ETA: 4s - loss: 4.4512 - acc: 0.0480 - ETA: 3s - loss: 4.4512 - acc: 0.0480 - ETA: 2s - loss: 4.4505 - acc: 0.0480 - ETA: 1s - loss: 4.4496 - acc: 0.0479Epoch 00001: val_loss improved from 4.61134 to 4.30311, saving model to saved_models/weights.best.from_scratch.hdf5
6680/6680 [==============================] - 345s - loss: 4.4490 - acc: 0.0481 - val_loss: 4.3031 - val_acc: 0.0599
Epoch 3/5
6660/6680 [============================>.] - ETA: 330s - loss: 4.1173 - acc: 0.0500 - ETA: 338s - loss: 4.2275 - acc: 0.0500 - ETA: 336s - loss: 4.1488 - acc: 0.0667 - ETA: 336s - loss: 4.1383 - acc: 0.0625 - ETA: 335s - loss: 4.2230 - acc: 0.0600 - ETA: 334s - loss: 4.1793 - acc: 0.0667 - ETA: 334s - loss: 4.1958 - acc: 0.0643 - ETA: 335s - loss: 4.1428 - acc: 0.0750 - ETA: 336s - loss: 4.1579 - acc: 0.0722 - ETA: 334s - loss: 4.1609 - acc: 0.0750 - ETA: 335s - loss: 4.1852 - acc: 0.0773 - ETA: 333s - loss: 4.1940 - acc: 0.0708 - ETA: 332s - loss: 4.1556 - acc: 0.0808 - ETA: 330s - loss: 4.1294 - acc: 0.0821 - ETA: 329s - loss: 4.0826 - acc: 0.0900 - ETA: 328s - loss: 4.0576 - acc: 0.1000 - ETA: 327s - loss: 4.0382 - acc: 0.0971 - ETA: 326s - loss: 4.0456 - acc: 0.0972 - ETA: 325s - loss: 4.0516 - acc: 0.0947 - ETA: 324s - loss: 4.0585 - acc: 0.0925 - ETA: 323s - loss: 4.0544 - acc: 0.0929 - ETA: 322s - loss: 4.0353 - acc: 0.0955 - ETA: 321s - loss: 4.0608 - acc: 0.0935 - ETA: 320s - loss: 4.0571 - acc: 0.0979 - ETA: 319s - loss: 4.0433 - acc: 0.1040 - ETA: 319s - loss: 4.0475 - acc: 0.1000 - ETA: 318s - loss: 4.0357 - acc: 0.1037 - ETA: 318s - loss: 4.0545 - acc: 0.1000 - ETA: 317s - loss: 4.0449 - acc: 0.1017 - ETA: 316s - loss: 4.0381 - acc: 0.1050 - ETA: 315s - loss: 4.0356 - acc: 0.1032 - ETA: 315s - loss: 4.0234 - acc: 0.1078 - ETA: 314s - loss: 4.0138 - acc: 0.1076 - ETA: 313s - loss: 4.0203 - acc: 0.1074 - ETA: 312s - loss: 4.0302 - acc: 0.1100 - ETA: 311s - loss: 4.0283 - acc: 0.1097 - ETA: 310s - loss: 4.0313 - acc: 0.1081 - ETA: 308s - loss: 4.0321 - acc: 0.1105 - ETA: 307s - loss: 4.0222 - acc: 0.1141 - ETA: 306s - loss: 4.0296 - acc: 0.1113 - ETA: 305s - loss: 4.0258 - acc: 0.1122 - ETA: 304s - loss: 4.0178 - acc: 0.1143 - ETA: 303s - loss: 4.0213 - acc: 0.1151 - ETA: 302s - loss: 4.0165 - acc: 0.1148 - ETA: 301s - loss: 4.0167 - acc: 0.1167 - ETA: 300s - loss: 4.0225 - acc: 0.1152 - ETA: 298s - loss: 4.0214 - acc: 0.1160 - ETA: 298s - loss: 4.0220 - acc: 0.1156 - ETA: 297s - loss: 4.0242 - acc: 0.1163 - ETA: 296s - loss: 4.0235 - acc: 0.1180 - ETA: 295s - loss: 4.0156 - acc: 0.1196 - ETA: 294s - loss: 4.0066 - acc: 0.1212 - ETA: 293s - loss: 4.0033 - acc: 0.1226 - ETA: 292s - loss: 3.9972 - acc: 0.1231 - ETA: 291s - loss: 4.0049 - acc: 0.1227 - ETA: 290s - loss: 4.0011 - acc: 0.1223 - ETA: 289s - loss: 4.0033 - acc: 0.1219 - ETA: 288s - loss: 3.9983 - acc: 0.1207 - ETA: 287s - loss: 4.0026 - acc: 0.1186 - ETA: 286s - loss: 4.0041 - acc: 0.1183 - ETA: 285s - loss: 4.0132 - acc: 0.1180 - ETA: 284s - loss: 4.0079 - acc: 0.1194 - ETA: 283s - loss: 4.0097 - acc: 0.1190 - ETA: 282s - loss: 3.9985 - acc: 0.1227 - ETA: 281s - loss: 4.0023 - acc: 0.1223 - ETA: 279s - loss: 4.0041 - acc: 0.1220 - ETA: 278s - loss: 4.0106 - acc: 0.1231 - ETA: 277s - loss: 4.0138 - acc: 0.1213 - ETA: 276s - loss: 4.0133 - acc: 0.1210 - ETA: 275s - loss: 4.0081 - acc: 0.1207 - ETA: 274s - loss: 4.0055 - acc: 0.1204 - ETA: 273s - loss: 4.0038 - acc: 0.1201 - ETA: 272s - loss: 4.0046 - acc: 0.1199 - ETA: 271s - loss: 3.9986 - acc: 0.1196 - ETA: 270s - loss: 3.9973 - acc: 0.1193 - ETA: 269s - loss: 3.9964 - acc: 0.1178 - ETA: 268s - loss: 3.9974 - acc: 0.1169 - ETA: 267s - loss: 4.0010 - acc: 0.1167 - ETA: 266s - loss: 4.0032 - acc: 0.1158 - ETA: 265s - loss: 4.0021 - acc: 0.1156 - ETA: 264s - loss: 4.0007 - acc: 0.1148 - ETA: 263s - loss: 3.9981 - acc: 0.1146 - ETA: 262s - loss: 4.0031 - acc: 0.1139 - ETA: 261s - loss: 4.0019 - acc: 0.1137 - ETA: 260s - loss: 4.0065 - acc: 0.1124 - ETA: 259s - loss: 4.0047 - acc: 0.1128 - ETA: 258s - loss: 4.0105 - acc: 0.1115 - ETA: 257s - loss: 4.0085 - acc: 0.1125 - ETA: 257s - loss: 4.0024 - acc: 0.1140 - ETA: 256s - loss: 4.0027 - acc: 0.1133 - ETA: 255s - loss: 4.0073 - acc: 0.1132 - ETA: 254s - loss: 4.0082 - acc: 0.1130 - ETA: 252s - loss: 4.0026 - acc: 0.1156 - ETA: 251s - loss: 4.0025 - acc: 0.1154 - ETA: 250s - loss: 3.9947 - acc: 0.1174 - ETA: 249s - loss: 3.9977 - acc: 0.1167 - ETA: 248s - loss: 4.0001 - acc: 0.1155 - ETA: 247s - loss: 4.0023 - acc: 0.1143 - ETA: 246s - loss: 4.0014 - acc: 0.1157 - ETA: 245s - loss: 3.9982 - acc: 0.1150 - ETA: 244s - loss: 3.9944 - acc: 0.1163 - ETA: 243s - loss: 4.0000 - acc: 0.1157 - ETA: 242s - loss: 3.9974 - acc: 0.1155 - ETA: 241s - loss: 3.9991 - acc: 0.1159 - ETA: 240s - loss: 4.0004 - acc: 0.1152 - ETA: 238s - loss: 4.0002 - acc: 0.1142 - ETA: 237s - loss: 3.9976 - acc: 0.1150 - ETA: 236s - loss: 3.9957 - acc: 0.1144 - ETA: 235s - loss: 3.9958 - acc: 0.1147 - ETA: 234s - loss: 3.9952 - acc: 0.1145 - ETA: 233s - loss: 3.9905 - acc: 0.1167 - ETA: 232s - loss: 3.9913 - acc: 0.1156 - ETA: 231s - loss: 3.9964 - acc: 0.1146 - ETA: 230s - loss: 3.9949 - acc: 0.1140 - ETA: 229s - loss: 3.9960 - acc: 0.1135 - ETA: 228s - loss: 3.9982 - acc: 0.1129 - ETA: 227s - loss: 3.9951 - acc: 0.1124 - ETA: 226s - loss: 3.9919 - acc: 0.1140 - ETA: 225s - loss: 3.9918 - acc: 0.1143 - ETA: 224s - loss: 3.9858 - acc: 0.1154 - ETA: 222s - loss: 3.9877 - acc: 0.1149 - ETA: 221s - loss: 3.9844 - acc: 0.1160 - ETA: 220s - loss: 3.9851 - acc: 0.1159 - ETA: 219s - loss: 3.9847 - acc: 0.1153 - ETA: 218s - loss: 3.9875 - acc: 0.1148 - ETA: 217s - loss: 3.9860 - acc: 0.1143 - ETA: 216s - loss: 3.9905 - acc: 0.1138 - ETA: 215s - loss: 3.9924 - acc: 0.1129 - ETA: 214s - loss: 3.9921 - acc: 0.1132 - ETA: 213s - loss: 3.9906 - acc: 0.1142 - ETA: 212s - loss: 3.9908 - acc: 0.1145 - ETA: 211s - loss: 3.9920 - acc: 0.1136 - ETA: 210s - loss: 3.9939 - acc: 0.1132 - ETA: 209s - loss: 3.9951 - acc: 0.1127 - ETA: 208s - loss: 3.9954 - acc: 0.1122 - ETA: 207s - loss: 3.9948 - acc: 0.1121 - ETA: 206s - loss: 3.9940 - acc: 0.1128 - ETA: 205s - loss: 3.9913 - acc: 0.1138 - ETA: 204s - loss: 3.9902 - acc: 0.1129 - ETA: 203s - loss: 3.9905 - acc: 0.1129 - ETA: 202s - loss: 3.9861 - acc: 0.1138 - ETA: 201s - loss: 3.9853 - acc: 0.1137 - ETA: 200s - loss: 3.9857 - acc: 0.1143 - ETA: 199s - loss: 3.9846 - acc: 0.1146 - ETA: 198s - loss: 3.9853 - acc: 0.1141 - ETA: 197s - loss: 3.9875 - acc: 0.1140 - ETA: 196s - loss: 3.9869 - acc: 0.1150 - ETA: 195s - loss: 3.9871 - acc: 0.1149 - ETA: 194s - loss: 3.9857 - acc: 0.1154 - ETA: 193s - loss: 3.9863 - acc: 0.1153 - ETA: 192s - loss: 3.9864 - acc: 0.1152 - ETA: 191s - loss: 3.9853 - acc: 0.1148 - ETA: 190s - loss: 3.9858 - acc: 0.1147 - ETA: 189s - loss: 3.9852 - acc: 0.1149 - ETA: 187s - loss: 3.9856 - acc: 0.1148 - ETA: 186s - loss: 3.9855 - acc: 0.1144 - ETA: 185s - loss: 3.9828 - acc: 0.1150 - ETA: 184s - loss: 3.9843 - acc: 0.1152 - ETA: 183s - loss: 3.9808 - acc: 0.1157 - ETA: 182s - loss: 3.9810 - acc: 0.1156 - ETA: 181s - loss: 3.9814 - acc: 0.1161 - ETA: 180s - loss: 3.9816 - acc: 0.1157 - ETA: 179s - loss: 3.9802 - acc: 0.1160 - ETA: 178s - loss: 3.9798 - acc: 0.1159 - ETA: 177s - loss: 3.9788 - acc: 0.1161 - ETA: 176s - loss: 3.9795 - acc: 0.1166 - ETA: 175s - loss: 3.9853 - acc: 0.1168 - ETA: 174s - loss: 3.9855 - acc: 0.1167 - ETA: 173s - loss: 3.9872 - acc: 0.1169 - ETA: 172s - loss: 3.9869 - acc: 0.1176 - ETA: 170s - loss: 3.9866 - acc: 0.1173 - ETA: 169s - loss: 3.9859 - acc: 0.1174 - ETA: 168s - loss: 3.9868 - acc: 0.1173 - ETA: 167s - loss: 3.9888 - acc: 0.1172 - ETA: 166s - loss: 3.9865 - acc: 0.1177 - ETA: 165s - loss: 3.9874 - acc: 0.1173 - ETA: 164s - loss: 3.9883 - acc: 0.1178 - ETA: 163s - loss: 3.9890 - acc: 0.1174 - ETA: 162s - loss: 3.9865 - acc: 0.1184 - ETA: 161s - loss: 3.9853 - acc: 0.1183 - ETA: 160s - loss: 3.9839 - acc: 0.1182 - ETA: 159s - loss: 3.9838 - acc: 0.1176 - ETA: 158s - loss: 3.9817 - acc: 0.1189 - ETA: 157s - loss: 3.9803 - acc: 0.1188 - ETA: 156s - loss: 3.9791 - acc: 0.1192 - ETA: 155s - loss: 3.9812 - acc: 0.1188 - ETA: 154s - loss: 3.9804 - acc: 0.1187 - ETA: 153s - loss: 3.9784 - acc: 0.1191 - ETA: 152s - loss: 3.9789 - acc: 0.1190 - ETA: 150s - loss: 3.9801 - acc: 0.1192 - ETA: 149s - loss: 3.9805 - acc: 0.1194 - ETA: 148s - loss: 3.9815 - acc: 0.1198 - ETA: 147s - loss: 3.9831 - acc: 0.1192 - ETA: 146s - loss: 3.9833 - acc: 0.1188 - ETA: 145s - loss: 3.9811 - acc: 0.1190 - ETA: 144s - loss: 3.9805 - acc: 0.1191 - ETA: 143s - loss: 3.9794 - acc: 0.1190 - ETA: 142s - loss: 3.9804 - acc: 0.1184 - ETA: 141s - loss: 3.9785 - acc: 0.1183 - ETA: 140s - loss: 3.9766 - acc: 0.1185 - ETA: 139s - loss: 3.9764 - acc: 0.1184 - ETA: 138s - loss: 3.9779 - acc: 0.1181 - ETA: 137s - loss: 3.9792 - acc: 0.1180 - ETA: 136s - loss: 3.9789 - acc: 0.1181 - ETA: 135s - loss: 3.9784 - acc: 0.1180 - ETA: 134s - loss: 3.9789 - acc: 0.1182 - ETA: 133s - loss: 3.9778 - acc: 0.1184 - ETA: 131s - loss: 3.9819 - acc: 0.1178 - ETA: 130s - loss: 3.9818 - acc: 0.1177 - ETA: 129s - loss: 3.9796 - acc: 0.1186 - ETA: 128s - loss: 3.9774 - acc: 0.1190 - ETA: 127s - loss: 3.9758 - acc: 0.1191 - ETA: 126s - loss: 3.9741 - acc: 0.1195 - ETA: 125s - loss: 3.9756 - acc: 0.1192 - ETA: 124s - loss: 3.9765 - acc: 0.1191 - ETA: 123s - loss: 3.9763 - acc: 0.1194 - ETA: 122s - loss: 3.9740 - acc: 0.1196 - ETA: 121s - loss: 3.9763 - acc: 0.1195 - ETA: 120s - loss: 3.9760 - acc: 0.1196 - ETA: 119s - loss: 3.9756 - acc: 0.1193 - ETA: 118s - loss: 3.9765 - acc: 0.1195 - ETA: 117s - loss: 3.9753 - acc: 0.1196 - ETA: 116s - loss: 3.9746 - acc: 0.1193 - ETA: 115s - loss: 3.9735 - acc: 0.1188 - ETA: 114s - loss: 3.9727 - acc: 0.1189 - ETA: 113s - loss: 3.9710 - acc: 0.1195 - ETA: 112s - loss: 3.9708 - acc: 0.1198 - ETA: 110s - loss: 3.9706 - acc: 0.1197 - ETA: 109s - loss: 3.9687 - acc: 0.1201 - ETA: 108s - loss: 3.9692 - acc: 0.1198 - ETA: 107s - loss: 3.9686 - acc: 0.1193 - ETA: 106s - loss: 3.9683 - acc: 0.1194 - ETA: 105s - loss: 3.9688 - acc: 0.1193 - ETA: 104s - loss: 3.9682 - acc: 0.1199 - ETA: 103s - loss: 3.9664 - acc: 0.1202 - ETA: 102s - loss: 3.9669 - acc: 0.1203 - ETA: 101s - loss: 3.9651 - acc: 0.1205 - ETA: 100s - loss: 3.9635 - acc: 0.1206 - ETA: 99s - loss: 3.9648 - acc: 0.1205  - ETA: 98s - loss: 3.9639 - acc: 0.1202 - ETA: 97s - loss: 3.9626 - acc: 0.1203 - ETA: 96s - loss: 3.9638 - acc: 0.1198 - ETA: 95s - loss: 3.9646 - acc: 0.1200 - ETA: 94s - loss: 3.9648 - acc: 0.1195 - ETA: 93s - loss: 3.9652 - acc: 0.1194 - ETA: 92s - loss: 3.9644 - acc: 0.1191 - ETA: 91s - loss: 3.9649 - acc: 0.1188 - ETA: 90s - loss: 3.9648 - acc: 0.1188 - ETA: 88s - loss: 3.9654 - acc: 0.1185 - ETA: 87s - loss: 3.9655 - acc: 0.1182 - ETA: 86s - loss: 3.9665 - acc: 0.1181 - ETA: 85s - loss: 3.9661 - acc: 0.1177 - ETA: 84s - loss: 3.9633 - acc: 0.1180 - ETA: 83s - loss: 3.9618 - acc: 0.1185 - ETA: 82s - loss: 3.9614 - acc: 0.1186 - ETA: 81s - loss: 3.9592 - acc: 0.1189 - ETA: 80s - loss: 3.9582 - acc: 0.1195 - ETA: 79s - loss: 3.9566 - acc: 0.1194 - ETA: 78s - loss: 3.9568 - acc: 0.1193 - ETA: 77s - loss: 3.9561 - acc: 0.1196 - ETA: 76s - loss: 3.9552 - acc: 0.1193 - ETA: 75s - loss: 3.9538 - acc: 0.1193 - ETA: 74s - loss: 3.9517 - acc: 0.1196 - ETA: 73s - loss: 3.9506 - acc: 0.1197 - ETA: 72s - loss: 3.9491 - acc: 0.1196 - ETA: 71s - loss: 3.9517 - acc: 0.1192 - ETA: 70s - loss: 3.9508 - acc: 0.1195 - ETA: 69s - loss: 3.9505 - acc: 0.1194 - ETA: 68s - loss: 3.9496 - acc: 0.1195 - ETA: 67s - loss: 3.9488 - acc: 0.1198 - ETA: 66s - loss: 3.9500 - acc: 0.1194 - ETA: 64s - loss: 3.9484 - acc: 0.1197 - ETA: 63s - loss: 3.9490 - acc: 0.1194 - ETA: 62s - loss: 3.9478 - acc: 0.1193 - ETA: 61s - loss: 3.9489 - acc: 0.1191 - ETA: 60s - loss: 3.9486 - acc: 0.1196 - ETA: 59s - loss: 3.9521 - acc: 0.1191 - ETA: 58s - loss: 3.9528 - acc: 0.1187 - ETA: 57s - loss: 3.9552 - acc: 0.1183 - ETA: 56s - loss: 3.9533 - acc: 0.1186 - ETA: 55s - loss: 3.9536 - acc: 0.1185 - ETA: 54s - loss: 3.9535 - acc: 0.1183 - ETA: 53s - loss: 3.9531 - acc: 0.1182 - ETA: 52s - loss: 3.9515 - acc: 0.1185 - ETA: 51s - loss: 3.9520 - acc: 0.1184 - ETA: 50s - loss: 3.9501 - acc: 0.1187 - ETA: 49s - loss: 3.9498 - acc: 0.1188 - ETA: 48s - loss: 3.9487 - acc: 0.1193 - ETA: 47s - loss: 3.9474 - acc: 0.1192 - ETA: 46s - loss: 3.9468 - acc: 0.1195 - ETA: 45s - loss: 3.9468 - acc: 0.1194 - ETA: 44s - loss: 3.9474 - acc: 0.1192 - ETA: 43s - loss: 3.9476 - acc: 0.1193 - ETA: 42s - loss: 3.9466 - acc: 0.1194 - ETA: 40s - loss: 3.9459 - acc: 0.1192 - ETA: 39s - loss: 3.9458 - acc: 0.1189 - ETA: 38s - loss: 3.9478 - acc: 0.1189 - ETA: 37s - loss: 3.9472 - acc: 0.1193 - ETA: 36s - loss: 3.9465 - acc: 0.1196 - ETA: 35s - loss: 3.9475 - acc: 0.1192 - ETA: 34s - loss: 3.9451 - acc: 0.1198 - ETA: 33s - loss: 3.9445 - acc: 0.1197 - ETA: 32s - loss: 3.9443 - acc: 0.1193 - ETA: 31s - loss: 3.9431 - acc: 0.1191 - ETA: 30s - loss: 3.9427 - acc: 0.1190 - ETA: 29s - loss: 3.9417 - acc: 0.1191 - ETA: 28s - loss: 3.9393 - acc: 0.1194 - ETA: 27s - loss: 3.9397 - acc: 0.1192 - ETA: 26s - loss: 3.9404 - acc: 0.1189 - ETA: 25s - loss: 3.9394 - acc: 0.1190 - ETA: 24s - loss: 3.9400 - acc: 0.1190 - ETA: 23s - loss: 3.9417 - acc: 0.1186 - ETA: 22s - loss: 3.9413 - acc: 0.1187 - ETA: 21s - loss: 3.9405 - acc: 0.1186 - ETA: 20s - loss: 3.9414 - acc: 0.1184 - ETA: 18s - loss: 3.9418 - acc: 0.1182 - ETA: 17s - loss: 3.9411 - acc: 0.1186 - ETA: 16s - loss: 3.9420 - acc: 0.1189 - ETA: 15s - loss: 3.9415 - acc: 0.1190 - ETA: 14s - loss: 3.9423 - acc: 0.1189 - ETA: 13s - loss: 3.9416 - acc: 0.1192 - ETA: 12s - loss: 3.9418 - acc: 0.1193 - ETA: 11s - loss: 3.9414 - acc: 0.1190 - ETA: 10s - loss: 3.9409 - acc: 0.1191 - ETA: 9s - loss: 3.9408 - acc: 0.1194  - ETA: 8s - loss: 3.9415 - acc: 0.1198 - ETA: 7s - loss: 3.9418 - acc: 0.1197 - ETA: 6s - loss: 3.9407 - acc: 0.1198 - ETA: 5s - loss: 3.9421 - acc: 0.1199 - ETA: 4s - loss: 3.9411 - acc: 0.1197 - ETA: 3s - loss: 3.9415 - acc: 0.1195 - ETA: 2s - loss: 3.9410 - acc: 0.1193 - ETA: 1s - loss: 3.9401 - acc: 0.1194Epoch 00002: val_loss improved from 4.30311 to 4.14015, saving model to saved_models/weights.best.from_scratch.hdf5
6680/6680 [==============================] - 360s - loss: 3.9408 - acc: 0.1195 - val_loss: 4.1402 - val_acc: 0.0922
Epoch 4/5
6660/6680 [============================>.] - ETA: 328s - loss: 3.2256 - acc: 0.4000 - ETA: 335s - loss: 3.2540 - acc: 0.3250 - ETA: 337s - loss: 3.1540 - acc: 0.3000 - ETA: 338s - loss: 3.0733 - acc: 0.3000 - ETA: 338s - loss: 3.1175 - acc: 0.2600 - ETA: 338s - loss: 3.2180 - acc: 0.2583 - ETA: 337s - loss: 3.2110 - acc: 0.2643 - ETA: 336s - loss: 3.2235 - acc: 0.2688 - ETA: 335s - loss: 3.2820 - acc: 0.2500 - ETA: 333s - loss: 3.2986 - acc: 0.2550 - ETA: 333s - loss: 3.2660 - acc: 0.2636 - ETA: 332s - loss: 3.2651 - acc: 0.2583 - ETA: 331s - loss: 3.2930 - acc: 0.2500 - ETA: 330s - loss: 3.3144 - acc: 0.2571 - ETA: 329s - loss: 3.2989 - acc: 0.2600 - ETA: 328s - loss: 3.2770 - acc: 0.2594 - ETA: 327s - loss: 3.2649 - acc: 0.2647 - ETA: 326s - loss: 3.2913 - acc: 0.2556 - ETA: 325s - loss: 3.2972 - acc: 0.2526 - ETA: 324s - loss: 3.2996 - acc: 0.2525 - ETA: 323s - loss: 3.2939 - acc: 0.2500 - ETA: 322s - loss: 3.2940 - acc: 0.2455 - ETA: 321s - loss: 3.2803 - acc: 0.2457 - ETA: 321s - loss: 3.2930 - acc: 0.2458 - ETA: 319s - loss: 3.2983 - acc: 0.2440 - ETA: 318s - loss: 3.3099 - acc: 0.2385 - ETA: 317s - loss: 3.3135 - acc: 0.2370 - ETA: 316s - loss: 3.3132 - acc: 0.2357 - ETA: 315s - loss: 3.2956 - acc: 0.2397 - ETA: 315s - loss: 3.2946 - acc: 0.2383 - ETA: 314s - loss: 3.3087 - acc: 0.2371 - ETA: 314s - loss: 3.3059 - acc: 0.2391 - ETA: 313s - loss: 3.2795 - acc: 0.2455 - ETA: 312s - loss: 3.2881 - acc: 0.2441 - ETA: 311s - loss: 3.2959 - acc: 0.2429 - ETA: 310s - loss: 3.2816 - acc: 0.2472 - ETA: 310s - loss: 3.2759 - acc: 0.2514 - ETA: 309s - loss: 3.2740 - acc: 0.2500 - ETA: 308s - loss: 3.2500 - acc: 0.2551 - ETA: 307s - loss: 3.2377 - acc: 0.2550 - ETA: 306s - loss: 3.2395 - acc: 0.2549 - ETA: 305s - loss: 3.2414 - acc: 0.2560 - ETA: 303s - loss: 3.2325 - acc: 0.2558 - ETA: 302s - loss: 3.2221 - acc: 0.2568 - ETA: 301s - loss: 3.2204 - acc: 0.2567 - ETA: 300s - loss: 3.2101 - acc: 0.2576 - ETA: 299s - loss: 3.2077 - acc: 0.2564 - ETA: 298s - loss: 3.1971 - acc: 0.2573 - ETA: 297s - loss: 3.1977 - acc: 0.2551 - ETA: 296s - loss: 3.2006 - acc: 0.2560 - ETA: 295s - loss: 3.1981 - acc: 0.2549 - ETA: 294s - loss: 3.1949 - acc: 0.2548 - ETA: 292s - loss: 3.1979 - acc: 0.2557 - ETA: 291s - loss: 3.1887 - acc: 0.2574 - ETA: 290s - loss: 3.1816 - acc: 0.2591 - ETA: 289s - loss: 3.1787 - acc: 0.2598 - ETA: 288s - loss: 3.1786 - acc: 0.2596 - ETA: 287s - loss: 3.1814 - acc: 0.2586 - ETA: 286s - loss: 3.1827 - acc: 0.2585 - ETA: 285s - loss: 3.1746 - acc: 0.2608 - ETA: 284s - loss: 3.1754 - acc: 0.2607 - ETA: 283s - loss: 3.1810 - acc: 0.2613 - ETA: 282s - loss: 3.1909 - acc: 0.2587 - ETA: 280s - loss: 3.1895 - acc: 0.2586 - ETA: 279s - loss: 3.1884 - acc: 0.2592 - ETA: 278s - loss: 3.1891 - acc: 0.2583 - ETA: 277s - loss: 3.1861 - acc: 0.2582 - ETA: 276s - loss: 3.1796 - acc: 0.2588 - ETA: 275s - loss: 3.1811 - acc: 0.2587 - ETA: 274s - loss: 3.1736 - acc: 0.2607 - ETA: 273s - loss: 3.1799 - acc: 0.2606 - ETA: 272s - loss: 3.1773 - acc: 0.2611 - ETA: 271s - loss: 3.1735 - acc: 0.2610 - ETA: 270s - loss: 3.1657 - acc: 0.2628 - ETA: 269s - loss: 3.1756 - acc: 0.2613 - ETA: 268s - loss: 3.1793 - acc: 0.2599 - ETA: 267s - loss: 3.1819 - acc: 0.2591 - ETA: 266s - loss: 3.1793 - acc: 0.2590 - ETA: 265s - loss: 3.1838 - acc: 0.2589 - ETA: 264s - loss: 3.1875 - acc: 0.2569 - ETA: 263s - loss: 3.1886 - acc: 0.2562 - ETA: 262s - loss: 3.1874 - acc: 0.2555 - ETA: 261s - loss: 3.1844 - acc: 0.2566 - ETA: 260s - loss: 3.1799 - acc: 0.2583 - ETA: 259s - loss: 3.1930 - acc: 0.2571 - ETA: 258s - loss: 3.1891 - acc: 0.2581 - ETA: 257s - loss: 3.1820 - acc: 0.2598 - ETA: 256s - loss: 3.1823 - acc: 0.2585 - ETA: 255s - loss: 3.1784 - acc: 0.2596 - ETA: 254s - loss: 3.1775 - acc: 0.2600 - ETA: 252s - loss: 3.1685 - acc: 0.2615 - ETA: 251s - loss: 3.1734 - acc: 0.2614 - ETA: 250s - loss: 3.1775 - acc: 0.2602 - ETA: 249s - loss: 3.1764 - acc: 0.2612 - ETA: 248s - loss: 3.1712 - acc: 0.2611 - ETA: 247s - loss: 3.1689 - acc: 0.2620 - ETA: 246s - loss: 3.1678 - acc: 0.2613 - ETA: 245s - loss: 3.1666 - acc: 0.2602 - ETA: 244s - loss: 3.1638 - acc: 0.2611 - ETA: 243s - loss: 3.1602 - acc: 0.2615 - ETA: 242s - loss: 3.1643 - acc: 0.2624 - ETA: 241s - loss: 3.1599 - acc: 0.2632 - ETA: 240s - loss: 3.1653 - acc: 0.2631 - ETA: 239s - loss: 3.1632 - acc: 0.2639 - ETA: 238s - loss: 3.1653 - acc: 0.2638 - ETA: 237s - loss: 3.1612 - acc: 0.2646 - ETA: 236s - loss: 3.1660 - acc: 0.2650 - ETA: 235s - loss: 3.1657 - acc: 0.2648 - ETA: 234s - loss: 3.1646 - acc: 0.2647 - ETA: 233s - loss: 3.1649 - acc: 0.2645 - ETA: 232s - loss: 3.1612 - acc: 0.2658 - ETA: 231s - loss: 3.1632 - acc: 0.2647 - ETA: 230s - loss: 3.1586 - acc: 0.2655 - ETA: 228s - loss: 3.1634 - acc: 0.2645 - ETA: 227s - loss: 3.1635 - acc: 0.2652 - ETA: 226s - loss: 3.1621 - acc: 0.2668 - ETA: 225s - loss: 3.1608 - acc: 0.2675 - ETA: 224s - loss: 3.1623 - acc: 0.2661 - ETA: 223s - loss: 3.1622 - acc: 0.2664 - ETA: 222s - loss: 3.1634 - acc: 0.2658 - ETA: 221s - loss: 3.1624 - acc: 0.2665 - ETA: 220s - loss: 3.1616 - acc: 0.2672 - ETA: 219s - loss: 3.1625 - acc: 0.2671 - ETA: 218s - loss: 3.1610 - acc: 0.2669 - ETA: 217s - loss: 3.1563 - acc: 0.2672 - ETA: 216s - loss: 3.1506 - acc: 0.2675 - ETA: 215s - loss: 3.1509 - acc: 0.2669 - ETA: 214s - loss: 3.1511 - acc: 0.2672 - ETA: 213s - loss: 3.1517 - acc: 0.2667 - ETA: 212s - loss: 3.1567 - acc: 0.2665 - ETA: 211s - loss: 3.1493 - acc: 0.2687 - ETA: 210s - loss: 3.1436 - acc: 0.2689 - ETA: 209s - loss: 3.1390 - acc: 0.2703 - ETA: 208s - loss: 3.1396 - acc: 0.2701 - ETA: 207s - loss: 3.1429 - acc: 0.2700 - ETA: 205s - loss: 3.1433 - acc: 0.2702 - ETA: 204s - loss: 3.1417 - acc: 0.2701 - ETA: 203s - loss: 3.1421 - acc: 0.2699 - ETA: 202s - loss: 3.1406 - acc: 0.2694 - ETA: 201s - loss: 3.1396 - acc: 0.2686 - ETA: 200s - loss: 3.1381 - acc: 0.2688 - ETA: 199s - loss: 3.1361 - acc: 0.2697 - ETA: 198s - loss: 3.1404 - acc: 0.2696 - ETA: 197s - loss: 3.1446 - acc: 0.2681 - ETA: 196s - loss: 3.1415 - acc: 0.2683 - ETA: 195s - loss: 3.1431 - acc: 0.2678 - ETA: 194s - loss: 3.1418 - acc: 0.2680 - ETA: 193s - loss: 3.1403 - acc: 0.2689 - ETA: 192s - loss: 3.1448 - acc: 0.2681 - ETA: 191s - loss: 3.1449 - acc: 0.2677 - ETA: 190s - loss: 3.1430 - acc: 0.2685 - ETA: 189s - loss: 3.1467 - acc: 0.2684 - ETA: 188s - loss: 3.1447 - acc: 0.2683 - ETA: 187s - loss: 3.1419 - acc: 0.2685 - ETA: 186s - loss: 3.1461 - acc: 0.2684 - ETA: 185s - loss: 3.1475 - acc: 0.2676 - ETA: 183s - loss: 3.1437 - acc: 0.2682 - ETA: 182s - loss: 3.1458 - acc: 0.2680 - ETA: 181s - loss: 3.1482 - acc: 0.2686 - ETA: 180s - loss: 3.1455 - acc: 0.2688 - ETA: 179s - loss: 3.1442 - acc: 0.2689 - ETA: 178s - loss: 3.1422 - acc: 0.2682 - ETA: 177s - loss: 3.1417 - acc: 0.2681 - ETA: 176s - loss: 3.1423 - acc: 0.2677 - ETA: 175s - loss: 3.1442 - acc: 0.2673 - ETA: 174s - loss: 3.1476 - acc: 0.2672 - ETA: 173s - loss: 3.1477 - acc: 0.2671 - ETA: 172s - loss: 3.1527 - acc: 0.2664 - ETA: 171s - loss: 3.1543 - acc: 0.2654 - ETA: 170s - loss: 3.1507 - acc: 0.2665 - ETA: 169s - loss: 3.1512 - acc: 0.2667 - ETA: 168s - loss: 3.1530 - acc: 0.2669 - ETA: 167s - loss: 3.1529 - acc: 0.2671 - ETA: 166s - loss: 3.1516 - acc: 0.2672 - ETA: 165s - loss: 3.1539 - acc: 0.2674 - ETA: 164s - loss: 3.1546 - acc: 0.2673 - ETA: 163s - loss: 3.1522 - acc: 0.2675 - ETA: 162s - loss: 3.1514 - acc: 0.2685 - ETA: 161s - loss: 3.1513 - acc: 0.2687 - ETA: 160s - loss: 3.1538 - acc: 0.2681 - ETA: 159s - loss: 3.1551 - acc: 0.2677 - ETA: 158s - loss: 3.1566 - acc: 0.2670 - ETA: 156s - loss: 3.1531 - acc: 0.2675 - ETA: 155s - loss: 3.1511 - acc: 0.2679 - ETA: 154s - loss: 3.1517 - acc: 0.2681 - ETA: 153s - loss: 3.1537 - acc: 0.2675 - ETA: 152s - loss: 3.1521 - acc: 0.2676 - ETA: 151s - loss: 3.1521 - acc: 0.2676 - ETA: 150s - loss: 3.1545 - acc: 0.2667 - ETA: 149s - loss: 3.1542 - acc: 0.2668 - ETA: 148s - loss: 3.1538 - acc: 0.2662 - ETA: 147s - loss: 3.1537 - acc: 0.2659 - ETA: 146s - loss: 3.1537 - acc: 0.2655 - ETA: 145s - loss: 3.1520 - acc: 0.2657 - ETA: 144s - loss: 3.1581 - acc: 0.2651 - ETA: 143s - loss: 3.1583 - acc: 0.2648 - ETA: 142s - loss: 3.1552 - acc: 0.2657 - ETA: 141s - loss: 3.1547 - acc: 0.2659 - ETA: 140s - loss: 3.1600 - acc: 0.2651 - ETA: 139s - loss: 3.1597 - acc: 0.2645 - ETA: 138s - loss: 3.1593 - acc: 0.2642 - ETA: 137s - loss: 3.1605 - acc: 0.2644 - ETA: 136s - loss: 3.1626 - acc: 0.2635 - ETA: 135s - loss: 3.1612 - acc: 0.2642 - ETA: 134s - loss: 3.1616 - acc: 0.2644 - ETA: 133s - loss: 3.1624 - acc: 0.2643 - ETA: 132s - loss: 3.1615 - acc: 0.2643 - ETA: 131s - loss: 3.1615 - acc: 0.2639 - ETA: 130s - loss: 3.1610 - acc: 0.2639 - ETA: 129s - loss: 3.1613 - acc: 0.2636 - ETA: 128s - loss: 3.1583 - acc: 0.2647 - ETA: 127s - loss: 3.1599 - acc: 0.2649 - ETA: 125s - loss: 3.1554 - acc: 0.2655 - ETA: 124s - loss: 3.1548 - acc: 0.2657 - ETA: 123s - loss: 3.1567 - acc: 0.2658 - ETA: 122s - loss: 3.1577 - acc: 0.2662 - ETA: 121s - loss: 3.1584 - acc: 0.2664 - ETA: 120s - loss: 3.1554 - acc: 0.2670 - ETA: 119s - loss: 3.1532 - acc: 0.2680 - ETA: 118s - loss: 3.1515 - acc: 0.2682 - ETA: 117s - loss: 3.1515 - acc: 0.2681 - ETA: 116s - loss: 3.1492 - acc: 0.2685 - ETA: 115s - loss: 3.1469 - acc: 0.2686 - ETA: 114s - loss: 3.1430 - acc: 0.2696 - ETA: 113s - loss: 3.1458 - acc: 0.2687 - ETA: 112s - loss: 3.1479 - acc: 0.2684 - ETA: 111s - loss: 3.1464 - acc: 0.2683 - ETA: 110s - loss: 3.1461 - acc: 0.2684 - ETA: 109s - loss: 3.1430 - acc: 0.2690 - ETA: 108s - loss: 3.1427 - acc: 0.2687 - ETA: 107s - loss: 3.1411 - acc: 0.2688 - ETA: 106s - loss: 3.1416 - acc: 0.2685 - ETA: 105s - loss: 3.1406 - acc: 0.2691 - ETA: 104s - loss: 3.1416 - acc: 0.2684 - ETA: 103s - loss: 3.1390 - acc: 0.2687 - ETA: 102s - loss: 3.1411 - acc: 0.2686 - ETA: 101s - loss: 3.1412 - acc: 0.2692 - ETA: 100s - loss: 3.1436 - acc: 0.2689 - ETA: 99s - loss: 3.1415 - acc: 0.2692  - ETA: 97s - loss: 3.1415 - acc: 0.2690 - ETA: 96s - loss: 3.1405 - acc: 0.2691 - ETA: 95s - loss: 3.1443 - acc: 0.2688 - ETA: 94s - loss: 3.1451 - acc: 0.2689 - ETA: 93s - loss: 3.1463 - acc: 0.2682 - ETA: 92s - loss: 3.1458 - acc: 0.2680 - ETA: 91s - loss: 3.1464 - acc: 0.2675 - ETA: 90s - loss: 3.1456 - acc: 0.2672 - ETA: 89s - loss: 3.1443 - acc: 0.2677 - ETA: 88s - loss: 3.1447 - acc: 0.2679 - ETA: 87s - loss: 3.1437 - acc: 0.2676 - ETA: 86s - loss: 3.1418 - acc: 0.2673 - ETA: 85s - loss: 3.1399 - acc: 0.2677 - ETA: 84s - loss: 3.1406 - acc: 0.2678 - ETA: 83s - loss: 3.1415 - acc: 0.2679 - ETA: 82s - loss: 3.1396 - acc: 0.2678 - ETA: 81s - loss: 3.1390 - acc: 0.2684 - ETA: 80s - loss: 3.1407 - acc: 0.2683 - ETA: 79s - loss: 3.1409 - acc: 0.2678 - ETA: 78s - loss: 3.1400 - acc: 0.2680 - ETA: 77s - loss: 3.1412 - acc: 0.2675 - ETA: 76s - loss: 3.1394 - acc: 0.2676 - ETA: 75s - loss: 3.1373 - acc: 0.2681 - ETA: 74s - loss: 3.1393 - acc: 0.2683 - ETA: 72s - loss: 3.1409 - acc: 0.2674 - ETA: 71s - loss: 3.1388 - acc: 0.2681 - ETA: 70s - loss: 3.1396 - acc: 0.2679 - ETA: 69s - loss: 3.1385 - acc: 0.2682 - ETA: 68s - loss: 3.1361 - acc: 0.2685 - ETA: 67s - loss: 3.1367 - acc: 0.2684 - ETA: 66s - loss: 3.1385 - acc: 0.2681 - ETA: 65s - loss: 3.1393 - acc: 0.2679 - ETA: 64s - loss: 3.1382 - acc: 0.2676 - ETA: 63s - loss: 3.1374 - acc: 0.2679 - ETA: 62s - loss: 3.1402 - acc: 0.2677 - ETA: 61s - loss: 3.1404 - acc: 0.2678 - ETA: 60s - loss: 3.1393 - acc: 0.2681 - ETA: 59s - loss: 3.1396 - acc: 0.2681 - ETA: 58s - loss: 3.1397 - acc: 0.2680 - ETA: 57s - loss: 3.1384 - acc: 0.2679 - ETA: 56s - loss: 3.1403 - acc: 0.2680 - ETA: 55s - loss: 3.1401 - acc: 0.2681 - ETA: 54s - loss: 3.1397 - acc: 0.2679 - ETA: 53s - loss: 3.1413 - acc: 0.2680 - ETA: 52s - loss: 3.1414 - acc: 0.2680 - ETA: 51s - loss: 3.1413 - acc: 0.2677 - ETA: 50s - loss: 3.1410 - acc: 0.2680 - ETA: 48s - loss: 3.1413 - acc: 0.2685 - ETA: 47s - loss: 3.1410 - acc: 0.2684 - ETA: 46s - loss: 3.1399 - acc: 0.2685 - ETA: 45s - loss: 3.1394 - acc: 0.2683 - ETA: 44s - loss: 3.1419 - acc: 0.2679 - ETA: 43s - loss: 3.1402 - acc: 0.2682 - ETA: 42s - loss: 3.1381 - acc: 0.2686 - ETA: 41s - loss: 3.1379 - acc: 0.2682 - ETA: 40s - loss: 3.1347 - acc: 0.2685 - ETA: 39s - loss: 3.1353 - acc: 0.2682 - ETA: 38s - loss: 3.1358 - acc: 0.2677 - ETA: 37s - loss: 3.1353 - acc: 0.2674 - ETA: 36s - loss: 3.1356 - acc: 0.2672 - ETA: 35s - loss: 3.1342 - acc: 0.2677 - ETA: 34s - loss: 3.1342 - acc: 0.2674 - ETA: 33s - loss: 3.1360 - acc: 0.2675 - ETA: 32s - loss: 3.1380 - acc: 0.2668 - ETA: 31s - loss: 3.1391 - acc: 0.2668 - ETA: 30s - loss: 3.1404 - acc: 0.2667 - ETA: 29s - loss: 3.1380 - acc: 0.2672 - ETA: 28s - loss: 3.1370 - acc: 0.2671 - ETA: 27s - loss: 3.1363 - acc: 0.2670 - ETA: 26s - loss: 3.1351 - acc: 0.2672 - ETA: 25s - loss: 3.1343 - acc: 0.2668 - ETA: 23s - loss: 3.1356 - acc: 0.2666 - ETA: 22s - loss: 3.1349 - acc: 0.2665 - ETA: 21s - loss: 3.1332 - acc: 0.2671 - ETA: 20s - loss: 3.1341 - acc: 0.2667 - ETA: 19s - loss: 3.1334 - acc: 0.2668 - ETA: 18s - loss: 3.1336 - acc: 0.2668 - ETA: 17s - loss: 3.1323 - acc: 0.2670 - ETA: 16s - loss: 3.1306 - acc: 0.2673 - ETA: 15s - loss: 3.1284 - acc: 0.2682 - ETA: 14s - loss: 3.1293 - acc: 0.2681 - ETA: 13s - loss: 3.1300 - acc: 0.2678 - ETA: 12s - loss: 3.1308 - acc: 0.2679 - ETA: 11s - loss: 3.1298 - acc: 0.2683 - ETA: 10s - loss: 3.1291 - acc: 0.2681 - ETA: 9s - loss: 3.1279 - acc: 0.2686  - ETA: 8s - loss: 3.1272 - acc: 0.2687 - ETA: 7s - loss: 3.1263 - acc: 0.2685 - ETA: 6s - loss: 3.1255 - acc: 0.2688 - ETA: 5s - loss: 3.1267 - acc: 0.2685 - ETA: 4s - loss: 3.1302 - acc: 0.2685 - ETA: 3s - loss: 3.1303 - acc: 0.2684 - ETA: 2s - loss: 3.1291 - acc: 0.2685 - ETA: 1s - loss: 3.1298 - acc: 0.2680Epoch 00003: val_loss improved from 4.14015 to 4.13311, saving model to saved_models/weights.best.from_scratch.hdf5
6680/6680 [==============================] - 358s - loss: 3.1312 - acc: 0.2678 - val_loss: 4.1331 - val_acc: 0.0862
Epoch 5/5
6660/6680 [============================>.] - ETA: 337s - loss: 2.6836 - acc: 0.4500 - ETA: 347s - loss: 2.2644 - acc: 0.5000 - ETA: 349s - loss: 2.1094 - acc: 0.5333 - ETA: 349s - loss: 2.0193 - acc: 0.5375 - ETA: 346s - loss: 2.1373 - acc: 0.5100 - ETA: 344s - loss: 2.1629 - acc: 0.4917 - ETA: 344s - loss: 2.1353 - acc: 0.5000 - ETA: 343s - loss: 2.1308 - acc: 0.4938 - ETA: 341s - loss: 2.0979 - acc: 0.4944 - ETA: 340s - loss: 2.1274 - acc: 0.4850 - ETA: 338s - loss: 2.0933 - acc: 0.5000 - ETA: 337s - loss: 2.1092 - acc: 0.4917 - ETA: 336s - loss: 2.1176 - acc: 0.4885 - ETA: 335s - loss: 2.1075 - acc: 0.4893 - ETA: 334s - loss: 2.0882 - acc: 0.5000 - ETA: 333s - loss: 2.1060 - acc: 0.5000 - ETA: 332s - loss: 2.0759 - acc: 0.5088 - ETA: 331s - loss: 2.0534 - acc: 0.5139 - ETA: 330s - loss: 2.0312 - acc: 0.5211 - ETA: 329s - loss: 2.0342 - acc: 0.5225 - ETA: 328s - loss: 2.0532 - acc: 0.5262 - ETA: 327s - loss: 2.0637 - acc: 0.5250 - ETA: 326s - loss: 2.0812 - acc: 0.5174 - ETA: 325s - loss: 2.0967 - acc: 0.5125 - ETA: 324s - loss: 2.1116 - acc: 0.5080 - ETA: 323s - loss: 2.1071 - acc: 0.5077 - ETA: 322s - loss: 2.1004 - acc: 0.5130 - ETA: 320s - loss: 2.0934 - acc: 0.5143 - ETA: 319s - loss: 2.0785 - acc: 0.5155 - ETA: 318s - loss: 2.0723 - acc: 0.5167 - ETA: 317s - loss: 2.0628 - acc: 0.5177 - ETA: 316s - loss: 2.0389 - acc: 0.5234 - ETA: 315s - loss: 2.0150 - acc: 0.5273 - ETA: 314s - loss: 2.0098 - acc: 0.5279 - ETA: 313s - loss: 2.0504 - acc: 0.5200 - ETA: 313s - loss: 2.0545 - acc: 0.5194 - ETA: 312s - loss: 2.0616 - acc: 0.5162 - ETA: 311s - loss: 2.0561 - acc: 0.5184 - ETA: 310s - loss: 2.0482 - acc: 0.5192 - ETA: 309s - loss: 2.0504 - acc: 0.5200 - ETA: 307s - loss: 2.0559 - acc: 0.5195 - ETA: 306s - loss: 2.0637 - acc: 0.5179 - ETA: 305s - loss: 2.0666 - acc: 0.5151 - ETA: 304s - loss: 2.0643 - acc: 0.5170 - ETA: 303s - loss: 2.0783 - acc: 0.5167 - ETA: 302s - loss: 2.0793 - acc: 0.5185 - ETA: 301s - loss: 2.0723 - acc: 0.5213 - ETA: 300s - loss: 2.0637 - acc: 0.5208 - ETA: 299s - loss: 2.0719 - acc: 0.5163 - ETA: 298s - loss: 2.0695 - acc: 0.5160 - ETA: 297s - loss: 2.0782 - acc: 0.5157 - ETA: 296s - loss: 2.0726 - acc: 0.5173 - ETA: 295s - loss: 2.0700 - acc: 0.5189 - ETA: 294s - loss: 2.0717 - acc: 0.5185 - ETA: 293s - loss: 2.0648 - acc: 0.5191 - ETA: 292s - loss: 2.0584 - acc: 0.5196 - ETA: 291s - loss: 2.0497 - acc: 0.5193 - ETA: 290s - loss: 2.0624 - acc: 0.5164 - ETA: 289s - loss: 2.0678 - acc: 0.5144 - ETA: 288s - loss: 2.0667 - acc: 0.5133 - ETA: 287s - loss: 2.0542 - acc: 0.5156 - ETA: 286s - loss: 2.0560 - acc: 0.5145 - ETA: 285s - loss: 2.0507 - acc: 0.5143 - ETA: 283s - loss: 2.0523 - acc: 0.5141 - ETA: 282s - loss: 2.0526 - acc: 0.5131 - ETA: 281s - loss: 2.0566 - acc: 0.5121 - ETA: 280s - loss: 2.0585 - acc: 0.5119 - ETA: 279s - loss: 2.0502 - acc: 0.5125 - ETA: 278s - loss: 2.0494 - acc: 0.5109 - ETA: 277s - loss: 2.0481 - acc: 0.5121 - ETA: 276s - loss: 2.0405 - acc: 0.5134 - ETA: 275s - loss: 2.0401 - acc: 0.5139 - ETA: 274s - loss: 2.0351 - acc: 0.5164 - ETA: 272s - loss: 2.0522 - acc: 0.5135 - ETA: 271s - loss: 2.0581 - acc: 0.5120 - ETA: 270s - loss: 2.0537 - acc: 0.5125 - ETA: 269s - loss: 2.0527 - acc: 0.5130 - ETA: 268s - loss: 2.0479 - acc: 0.5135 - ETA: 267s - loss: 2.0515 - acc: 0.5114 - ETA: 266s - loss: 2.0587 - acc: 0.5088 - ETA: 265s - loss: 2.0637 - acc: 0.5062 - ETA: 264s - loss: 2.0623 - acc: 0.5061 - ETA: 263s - loss: 2.0648 - acc: 0.5042 - ETA: 262s - loss: 2.0566 - acc: 0.5065 - ETA: 261s - loss: 2.0637 - acc: 0.5053 - ETA: 260s - loss: 2.0685 - acc: 0.5023 - ETA: 259s - loss: 2.0622 - acc: 0.5023 - ETA: 258s - loss: 2.0592 - acc: 0.5028 - ETA: 257s - loss: 2.0613 - acc: 0.5028 - ETA: 256s - loss: 2.0546 - acc: 0.5028 - ETA: 255s - loss: 2.0558 - acc: 0.5022 - ETA: 254s - loss: 2.0541 - acc: 0.5022 - ETA: 253s - loss: 2.0600 - acc: 0.5011 - ETA: 252s - loss: 2.0579 - acc: 0.5021 - ETA: 251s - loss: 2.0547 - acc: 0.5026 - ETA: 250s - loss: 2.0548 - acc: 0.5026 - ETA: 249s - loss: 2.0508 - acc: 0.5036 - ETA: 248s - loss: 2.0496 - acc: 0.5056 - ETA: 246s - loss: 2.0514 - acc: 0.5061 - ETA: 245s - loss: 2.0477 - acc: 0.5060 - ETA: 244s - loss: 2.0498 - acc: 0.5054 - ETA: 243s - loss: 2.0466 - acc: 0.5069 - ETA: 242s - loss: 2.0427 - acc: 0.5092 - ETA: 241s - loss: 2.0452 - acc: 0.5091 - ETA: 240s - loss: 2.0438 - acc: 0.5095 - ETA: 239s - loss: 2.0454 - acc: 0.5094 - ETA: 238s - loss: 2.0398 - acc: 0.5093 - ETA: 237s - loss: 2.0380 - acc: 0.5102 - ETA: 236s - loss: 2.0374 - acc: 0.5096 - ETA: 235s - loss: 2.0333 - acc: 0.5091 - ETA: 234s - loss: 2.0303 - acc: 0.5095 - ETA: 232s - loss: 2.0247 - acc: 0.5112 - ETA: 231s - loss: 2.0262 - acc: 0.5102 - ETA: 230s - loss: 2.0228 - acc: 0.5114 - ETA: 229s - loss: 2.0193 - acc: 0.5126 - ETA: 228s - loss: 2.0170 - acc: 0.5142 - ETA: 227s - loss: 2.0195 - acc: 0.5145 - ETA: 226s - loss: 2.0163 - acc: 0.5144 - ETA: 225s - loss: 2.0168 - acc: 0.5147 - ETA: 224s - loss: 2.0212 - acc: 0.5129 - ETA: 223s - loss: 2.0240 - acc: 0.5116 - ETA: 222s - loss: 2.0254 - acc: 0.5111 - ETA: 221s - loss: 2.0259 - acc: 0.5098 - ETA: 220s - loss: 2.0246 - acc: 0.5097 - ETA: 219s - loss: 2.0280 - acc: 0.5088 - ETA: 218s - loss: 2.0251 - acc: 0.5103 - ETA: 217s - loss: 2.0279 - acc: 0.5098 - ETA: 216s - loss: 2.0263 - acc: 0.5113 - ETA: 215s - loss: 2.0228 - acc: 0.5112 - ETA: 214s - loss: 2.0202 - acc: 0.5108 - ETA: 213s - loss: 2.0261 - acc: 0.5088 - ETA: 211s - loss: 2.0305 - acc: 0.5076 - ETA: 210s - loss: 2.0360 - acc: 0.5068 - ETA: 209s - loss: 2.0346 - acc: 0.5075 - ETA: 208s - loss: 2.0353 - acc: 0.5074 - ETA: 207s - loss: 2.0327 - acc: 0.5074 - ETA: 206s - loss: 2.0355 - acc: 0.5058 - ETA: 205s - loss: 2.0384 - acc: 0.5051 - ETA: 204s - loss: 2.0388 - acc: 0.5047 - ETA: 203s - loss: 2.0381 - acc: 0.5046 - ETA: 202s - loss: 2.0422 - acc: 0.5035 - ETA: 201s - loss: 2.0484 - acc: 0.5021 - ETA: 200s - loss: 2.0484 - acc: 0.5021 - ETA: 199s - loss: 2.0422 - acc: 0.5028 - ETA: 198s - loss: 2.0424 - acc: 0.5028 - ETA: 197s - loss: 2.0386 - acc: 0.5034 - ETA: 196s - loss: 2.0363 - acc: 0.5044 - ETA: 195s - loss: 2.0358 - acc: 0.5044 - ETA: 194s - loss: 2.0345 - acc: 0.5047 - ETA: 193s - loss: 2.0319 - acc: 0.5053 - ETA: 192s - loss: 2.0271 - acc: 0.5063 - ETA: 190s - loss: 2.0275 - acc: 0.5053 - ETA: 189s - loss: 2.0262 - acc: 0.5049 - ETA: 188s - loss: 2.0266 - acc: 0.5042 - ETA: 187s - loss: 2.0239 - acc: 0.5045 - ETA: 186s - loss: 2.0235 - acc: 0.5042 - ETA: 185s - loss: 2.0198 - acc: 0.5051 - ETA: 184s - loss: 2.0189 - acc: 0.5051 - ETA: 183s - loss: 2.0193 - acc: 0.5041 - ETA: 182s - loss: 2.0207 - acc: 0.5031 - ETA: 181s - loss: 2.0201 - acc: 0.5028 - ETA: 180s - loss: 2.0176 - acc: 0.5034 - ETA: 179s - loss: 2.0204 - acc: 0.5028 - ETA: 178s - loss: 2.0216 - acc: 0.5024 - ETA: 177s - loss: 2.0203 - acc: 0.5021 - ETA: 176s - loss: 2.0233 - acc: 0.5015 - ETA: 175s - loss: 2.0216 - acc: 0.5021 - ETA: 174s - loss: 2.0212 - acc: 0.5027 - ETA: 173s - loss: 2.0191 - acc: 0.5033 - ETA: 172s - loss: 2.0192 - acc: 0.5026 - ETA: 170s - loss: 2.0174 - acc: 0.5035 - ETA: 169s - loss: 2.0173 - acc: 0.5035 - ETA: 168s - loss: 2.0165 - acc: 0.5038 - ETA: 167s - loss: 2.0206 - acc: 0.5026 - ETA: 166s - loss: 2.0215 - acc: 0.5029 - ETA: 165s - loss: 2.0202 - acc: 0.5037 - ETA: 164s - loss: 2.0210 - acc: 0.5034 - ETA: 163s - loss: 2.0235 - acc: 0.5028 - ETA: 162s - loss: 2.0207 - acc: 0.5034 - ETA: 161s - loss: 2.0176 - acc: 0.5039 - ETA: 160s - loss: 2.0155 - acc: 0.5041 - ETA: 159s - loss: 2.0131 - acc: 0.5044 - ETA: 158s - loss: 2.0108 - acc: 0.5049 - ETA: 157s - loss: 2.0117 - acc: 0.5049 - ETA: 156s - loss: 2.0150 - acc: 0.5038 - ETA: 155s - loss: 2.0186 - acc: 0.5032 - ETA: 154s - loss: 2.0179 - acc: 0.5035 - ETA: 152s - loss: 2.0168 - acc: 0.5043 - ETA: 151s - loss: 2.0138 - acc: 0.5050 - ETA: 150s - loss: 2.0180 - acc: 0.5042 - ETA: 149s - loss: 2.0156 - acc: 0.5039 - ETA: 148s - loss: 2.0138 - acc: 0.5044 - ETA: 147s - loss: 2.0174 - acc: 0.5039 - ETA: 146s - loss: 2.0185 - acc: 0.5031 - ETA: 145s - loss: 2.0183 - acc: 0.5028 - ETA: 144s - loss: 2.0182 - acc: 0.5015 - ETA: 143s - loss: 2.0153 - acc: 0.5018 - ETA: 142s - loss: 2.0196 - acc: 0.5010 - ETA: 141s - loss: 2.0195 - acc: 0.5013 - ETA: 140s - loss: 2.0173 - acc: 0.5015 - ETA: 139s - loss: 2.0169 - acc: 0.5015 - ETA: 138s - loss: 2.0187 - acc: 0.5005 - ETA: 137s - loss: 2.0200 - acc: 0.5012 - ETA: 136s - loss: 2.0192 - acc: 0.5012 - ETA: 135s - loss: 2.0179 - acc: 0.5010 - ETA: 133s - loss: 2.0192 - acc: 0.5010 - ETA: 132s - loss: 2.0178 - acc: 0.5002 - ETA: 131s - loss: 2.0170 - acc: 0.5007 - ETA: 130s - loss: 2.0166 - acc: 0.5007 - ETA: 129s - loss: 2.0167 - acc: 0.5007 - ETA: 128s - loss: 2.0149 - acc: 0.5007 - ETA: 127s - loss: 2.0133 - acc: 0.5009 - ETA: 126s - loss: 2.0139 - acc: 0.5007 - ETA: 125s - loss: 2.0127 - acc: 0.5007 - ETA: 124s - loss: 2.0119 - acc: 0.5007 - ETA: 123s - loss: 2.0101 - acc: 0.5007 - ETA: 122s - loss: 2.0109 - acc: 0.5007 - ETA: 121s - loss: 2.0136 - acc: 0.5002 - ETA: 120s - loss: 2.0137 - acc: 0.5007 - ETA: 119s - loss: 2.0131 - acc: 0.5014 - ETA: 118s - loss: 2.0124 - acc: 0.5014 - ETA: 117s - loss: 2.0131 - acc: 0.5009 - ETA: 116s - loss: 2.0123 - acc: 0.5011 - ETA: 115s - loss: 2.0101 - acc: 0.5011 - ETA: 114s - loss: 2.0128 - acc: 0.5004 - ETA: 113s - loss: 2.0141 - acc: 0.5002 - ETA: 112s - loss: 2.0114 - acc: 0.5004 - ETA: 110s - loss: 2.0094 - acc: 0.5011 - ETA: 109s - loss: 2.0087 - acc: 0.5015 - ETA: 108s - loss: 2.0064 - acc: 0.5024 - ETA: 107s - loss: 2.0079 - acc: 0.5017 - ETA: 106s - loss: 2.0087 - acc: 0.5013 - ETA: 105s - loss: 2.0091 - acc: 0.5015 - ETA: 104s - loss: 2.0104 - acc: 0.5017 - ETA: 103s - loss: 2.0079 - acc: 0.5023 - ETA: 102s - loss: 2.0067 - acc: 0.5028 - ETA: 101s - loss: 2.0067 - acc: 0.5030 - ETA: 100s - loss: 2.0059 - acc: 0.5034 - ETA: 99s - loss: 2.0067 - acc: 0.5029  - ETA: 98s - loss: 2.0102 - acc: 0.5023 - ETA: 97s - loss: 2.0084 - acc: 0.5025 - ETA: 96s - loss: 2.0070 - acc: 0.5031 - ETA: 95s - loss: 2.0068 - acc: 0.5025 - ETA: 94s - loss: 2.0102 - acc: 0.5016 - ETA: 93s - loss: 2.0119 - acc: 0.5014 - ETA: 92s - loss: 2.0118 - acc: 0.5010 - ETA: 91s - loss: 2.0135 - acc: 0.5008 - ETA: 90s - loss: 2.0136 - acc: 0.5008 - ETA: 89s - loss: 2.0146 - acc: 0.5006 - ETA: 88s - loss: 2.0141 - acc: 0.5002 - ETA: 87s - loss: 2.0128 - acc: 0.5014 - ETA: 86s - loss: 2.0129 - acc: 0.5012 - ETA: 85s - loss: 2.0120 - acc: 0.5016 - ETA: 84s - loss: 2.0114 - acc: 0.5012 - ETA: 82s - loss: 2.0107 - acc: 0.5012 - ETA: 81s - loss: 2.0122 - acc: 0.5008 - ETA: 80s - loss: 2.0122 - acc: 0.5012 - ETA: 79s - loss: 2.0163 - acc: 0.5002 - ETA: 78s - loss: 2.0189 - acc: 0.4994 - ETA: 77s - loss: 2.0198 - acc: 0.4992 - ETA: 76s - loss: 2.0191 - acc: 0.4994 - ETA: 75s - loss: 2.0202 - acc: 0.4994 - ETA: 74s - loss: 2.0194 - acc: 0.4992 - ETA: 73s - loss: 2.0191 - acc: 0.4994 - ETA: 72s - loss: 2.0197 - acc: 0.4992 - ETA: 71s - loss: 2.0199 - acc: 0.4991 - ETA: 70s - loss: 2.0192 - acc: 0.4993 - ETA: 69s - loss: 2.0183 - acc: 0.4998 - ETA: 68s - loss: 2.0197 - acc: 0.4996 - ETA: 67s - loss: 2.0186 - acc: 0.5000 - ETA: 66s - loss: 2.0199 - acc: 0.4998 - ETA: 65s - loss: 2.0208 - acc: 0.5000 - ETA: 64s - loss: 2.0221 - acc: 0.4993 - ETA: 63s - loss: 2.0225 - acc: 0.4995 - ETA: 62s - loss: 2.0231 - acc: 0.4993 - ETA: 61s - loss: 2.0261 - acc: 0.4984 - ETA: 60s - loss: 2.0273 - acc: 0.4977 - ETA: 59s - loss: 2.0261 - acc: 0.4980 - ETA: 58s - loss: 2.0257 - acc: 0.4980 - ETA: 56s - loss: 2.0264 - acc: 0.4975 - ETA: 55s - loss: 2.0263 - acc: 0.4975 - ETA: 54s - loss: 2.0295 - acc: 0.4973 - ETA: 53s - loss: 2.0300 - acc: 0.4970 - ETA: 52s - loss: 2.0281 - acc: 0.4975 - ETA: 51s - loss: 2.0269 - acc: 0.4974 - ETA: 50s - loss: 2.0285 - acc: 0.4974 - ETA: 49s - loss: 2.0300 - acc: 0.4972 - ETA: 48s - loss: 2.0291 - acc: 0.4972 - ETA: 47s - loss: 2.0283 - acc: 0.4974 - ETA: 46s - loss: 2.0300 - acc: 0.4966 - ETA: 45s - loss: 2.0300 - acc: 0.4964 - ETA: 44s - loss: 2.0314 - acc: 0.4959 - ETA: 43s - loss: 2.0330 - acc: 0.4957 - ETA: 42s - loss: 2.0353 - acc: 0.4951 - ETA: 41s - loss: 2.0361 - acc: 0.4946 - ETA: 40s - loss: 2.0369 - acc: 0.4941 - ETA: 39s - loss: 2.0380 - acc: 0.4941 - ETA: 38s - loss: 2.0378 - acc: 0.4945 - ETA: 36s - loss: 2.0377 - acc: 0.4945 - ETA: 35s - loss: 2.0369 - acc: 0.4948 - ETA: 34s - loss: 2.0353 - acc: 0.4949 - ETA: 33s - loss: 2.0352 - acc: 0.4950 - ETA: 32s - loss: 2.0351 - acc: 0.4950 - ETA: 31s - loss: 2.0345 - acc: 0.4952 - ETA: 30s - loss: 2.0346 - acc: 0.4949 - ETA: 29s - loss: 2.0358 - acc: 0.4944 - ETA: 28s - loss: 2.0365 - acc: 0.4941 - ETA: 27s - loss: 2.0383 - acc: 0.4935 - ETA: 26s - loss: 2.0386 - acc: 0.4937 - ETA: 25s - loss: 2.0374 - acc: 0.4939 - ETA: 24s - loss: 2.0374 - acc: 0.4941 - ETA: 23s - loss: 2.0377 - acc: 0.4941 - ETA: 22s - loss: 2.0371 - acc: 0.4947 - ETA: 21s - loss: 2.0346 - acc: 0.4952 - ETA: 20s - loss: 2.0375 - acc: 0.4949 - ETA: 19s - loss: 2.0384 - acc: 0.4949 - ETA: 17s - loss: 2.0381 - acc: 0.4950 - ETA: 16s - loss: 2.0394 - acc: 0.4947 - ETA: 15s - loss: 2.0405 - acc: 0.4942 - ETA: 14s - loss: 2.0409 - acc: 0.4941 - ETA: 13s - loss: 2.0385 - acc: 0.4949 - ETA: 12s - loss: 2.0393 - acc: 0.4947 - ETA: 11s - loss: 2.0389 - acc: 0.4947 - ETA: 10s - loss: 2.0377 - acc: 0.4948 - ETA: 9s - loss: 2.0389 - acc: 0.4943  - ETA: 8s - loss: 2.0379 - acc: 0.4945 - ETA: 7s - loss: 2.0385 - acc: 0.4942 - ETA: 6s - loss: 2.0373 - acc: 0.4944 - ETA: 5s - loss: 2.0373 - acc: 0.4945 - ETA: 4s - loss: 2.0368 - acc: 0.4948 - ETA: 3s - loss: 2.0384 - acc: 0.4946 - ETA: 2s - loss: 2.0410 - acc: 0.4941 - ETA: 1s - loss: 2.0383 - acc: 0.4949Epoch 00004: val_loss did not improve
6680/6680 [==============================] - 362s - loss: 2.0373 - acc: 0.4952 - val_loss: 4.6632 - val_acc: 0.0898
Out[21]:
<keras.callbacks.History at 0x1cd35511278>

Load the Model with the Best Validation Loss


In [72]:
model.load_weights('saved_models/weights.best.from_scratch.hdf5')

Test the Model

Try out your model on the test dataset of dog images. Ensure that your test accuracy is greater than 1%.


In [73]:
# get index of predicted dog breed for each image in test set
dog_breed_predictions = [np.argmax(model.predict(np.expand_dims(tensor, axis=0))) for tensor in test_tensors]

# report test accuracy
test_accuracy = 100*np.sum(np.array(dog_breed_predictions)==np.argmax(test_targets, axis=1))/len(dog_breed_predictions)
print('Test accuracy: %.4f%%' % test_accuracy)


Test accuracy: 9.2105%

Step 4: Use a CNN to Classify Dog Breeds

To reduce training time without sacrificing accuracy, we show you how to train a CNN using transfer learning. In the following step, you will get a chance to use transfer learning to train your own CNN.

Obtain Bottleneck Features


In [74]:
import numpy as np
bottleneck_features = np.load('bottleneck_features/DogVGG16Data.npz')
train_VGG16 = bottleneck_features['train']
valid_VGG16 = bottleneck_features['valid']
test_VGG16 = bottleneck_features['test']

Model Architecture

The model uses the the pre-trained VGG-16 model as a fixed feature extractor, where the last convolutional output of VGG-16 is fed as input to our model. We only add a global average pooling layer and a fully connected layer, where the latter contains one node for each dog category and is equipped with a softmax.


In [75]:
VGG16_model = Sequential()
VGG16_model.add(GlobalAveragePooling2D(input_shape=train_VGG16.shape[1:]))
VGG16_model.add(Dense(133, activation='softmax'))

VGG16_model.summary()


_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
global_average_pooling2d_8 ( (None, 512)               0         
_________________________________________________________________
dense_10 (Dense)             (None, 133)               68229     
=================================================================
Total params: 68,229.0
Trainable params: 68,229.0
Non-trainable params: 0.0
_________________________________________________________________

Compile the Model


In [76]:
VGG16_model.compile(loss='categorical_crossentropy', optimizer='rmsprop', metrics=['accuracy'])

Train the Model


In [77]:
checkpointer = ModelCheckpoint(filepath='saved_models/weights.best.VGG16.hdf5', 
                               verbose=1, save_best_only=True)

VGG16_model.fit(train_VGG16, train_targets, 
          validation_data=(valid_VGG16, valid_targets),
          epochs=20, batch_size=20, callbacks=[checkpointer], verbose=1)


Train on 6680 samples, validate on 835 samples
Epoch 1/20
6600/6680 [============================>.] - ETA: 239s - loss: 14.1675 - acc: 0.0000e+00 - ETA: 27s - loss: 14.4089 - acc: 0.0167      - ETA: 16s - loss: 14.3924 - acc: 0.0188 - ETA: 11s - loss: 14.4816 - acc: 0.0239 - ETA: 9s - loss: 14.3595 - acc: 0.0250  - ETA: 7s - loss: 14.3250 - acc: 0.0243 - ETA: 6s - loss: 14.2652 - acc: 0.0256 - ETA: 5s - loss: 14.2486 - acc: 0.0255 - ETA: 5s - loss: 14.1420 - acc: 0.0320 - ETA: 4s - loss: 14.1468 - acc: 0.0341 - ETA: 4s - loss: 14.0790 - acc: 0.0370 - ETA: 3s - loss: 13.9784 - acc: 0.0424 - ETA: 3s - loss: 13.9374 - acc: 0.0425 - ETA: 3s - loss: 13.8755 - acc: 0.0475 - ETA: 3s - loss: 13.8128 - acc: 0.0505 - ETA: 2s - loss: 13.7186 - acc: 0.0521 - ETA: 2s - loss: 13.6371 - acc: 0.0544 - ETA: 2s - loss: 13.5961 - acc: 0.0556 - ETA: 2s - loss: 13.5177 - acc: 0.0578 - ETA: 2s - loss: 13.4376 - acc: 0.0587 - ETA: 2s - loss: 13.3818 - acc: 0.0608 - ETA: 1s - loss: 13.3543 - acc: 0.0621 - ETA: 1s - loss: 13.2770 - acc: 0.0642 - ETA: 1s - loss: 13.2318 - acc: 0.0669 - ETA: 1s - loss: 13.1711 - acc: 0.0696 - ETA: 1s - loss: 13.0810 - acc: 0.0756 - ETA: 1s - loss: 13.0458 - acc: 0.0785 - ETA: 1s - loss: 13.0195 - acc: 0.0804 - ETA: 1s - loss: 12.9729 - acc: 0.0836 - ETA: 1s - loss: 12.9068 - acc: 0.0864 - ETA: 0s - loss: 12.8572 - acc: 0.0891 - ETA: 0s - loss: 12.8044 - acc: 0.0921 - ETA: 0s - loss: 12.7976 - acc: 0.0930 - ETA: 0s - loss: 12.7273 - acc: 0.0965 - ETA: 0s - loss: 12.6824 - acc: 0.0989 - ETA: 0s - loss: 12.6227 - acc: 0.1029 - ETA: 0s - loss: 12.6058 - acc: 0.1041 - ETA: 0s - loss: 12.5648 - acc: 0.1066 - ETA: 0s - loss: 12.5195 - acc: 0.1088 - ETA: 0s - loss: 12.4950 - acc: 0.1098 - ETA: 0s - loss: 12.4636 - acc: 0.1121 - ETA: 0s - loss: 12.4153 - acc: 0.1143 - ETA: 0s - loss: 12.3767 - acc: 0.1164Epoch 00000: val_loss improved from inf to 10.91502, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 3s - loss: 12.3773 - acc: 0.1171 - val_loss: 10.9150 - val_acc: 0.2036
Epoch 2/20
6560/6680 [============================>.] - ETA: 2s - loss: 12.3920 - acc: 0.1500 - ETA: 2s - loss: 11.0126 - acc: 0.2063 - ETA: 2s - loss: 10.6228 - acc: 0.2367 - ETA: 2s - loss: 10.4494 - acc: 0.2435 - ETA: 2s - loss: 10.3785 - acc: 0.2468 - ETA: 2s - loss: 10.3797 - acc: 0.2539 - ETA: 2s - loss: 10.3044 - acc: 0.2522 - ETA: 1s - loss: 10.4541 - acc: 0.2417 - ETA: 1s - loss: 10.4218 - acc: 0.2460 - ETA: 1s - loss: 10.4385 - acc: 0.2464 - ETA: 1s - loss: 10.4951 - acc: 0.2429 - ETA: 1s - loss: 10.3980 - acc: 0.2465 - ETA: 1s - loss: 10.4039 - acc: 0.2489 - ETA: 1s - loss: 10.4031 - acc: 0.2515 - ETA: 1s - loss: 10.4051 - acc: 0.2532 - ETA: 1s - loss: 10.3634 - acc: 0.2573 - ETA: 1s - loss: 10.3446 - acc: 0.2596 - ETA: 1s - loss: 10.3778 - acc: 0.2593 - ETA: 1s - loss: 10.3634 - acc: 0.2591 - ETA: 1s - loss: 10.3563 - acc: 0.2599 - ETA: 1s - loss: 10.3415 - acc: 0.2597 - ETA: 1s - loss: 10.3690 - acc: 0.2574 - ETA: 1s - loss: 10.4027 - acc: 0.2565 - ETA: 0s - loss: 10.4088 - acc: 0.2562 - ETA: 0s - loss: 10.4076 - acc: 0.2564 - ETA: 0s - loss: 10.3965 - acc: 0.2567 - ETA: 0s - loss: 10.3968 - acc: 0.2566 - ETA: 0s - loss: 10.3761 - acc: 0.2566 - ETA: 0s - loss: 10.3784 - acc: 0.2558 - ETA: 0s - loss: 10.4006 - acc: 0.2547 - ETA: 0s - loss: 10.4211 - acc: 0.2542 - ETA: 0s - loss: 10.4407 - acc: 0.2536 - ETA: 0s - loss: 10.4425 - acc: 0.2535 - ETA: 0s - loss: 10.4492 - acc: 0.2533 - ETA: 0s - loss: 10.4200 - acc: 0.2561 - ETA: 0s - loss: 10.3676 - acc: 0.2592 - ETA: 0s - loss: 10.3665 - acc: 0.2590 - ETA: 0s - loss: 10.3604 - acc: 0.2596 - ETA: 0s - loss: 10.3477 - acc: 0.2604 - ETA: 0s - loss: 10.3574 - acc: 0.2593 - ETA: 0s - loss: 10.3461 - acc: 0.2608 - ETA: 0s - loss: 10.3621 - acc: 0.2601 - ETA: 0s - loss: 10.3604 - acc: 0.2605Epoch 00001: val_loss improved from 10.91502 to 10.42291, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 10.3595 - acc: 0.2608 - val_loss: 10.4229 - val_acc: 0.2599
Epoch 3/20
6600/6680 [============================>.] - ETA: 2s - loss: 12.8951 - acc: 0.2000 - ETA: 2s - loss: 10.3275 - acc: 0.3056 - ETA: 2s - loss: 10.3542 - acc: 0.2971 - ETA: 2s - loss: 10.4602 - acc: 0.2920 - ETA: 2s - loss: 10.3739 - acc: 0.2939 - ETA: 1s - loss: 10.1675 - acc: 0.3073 - ETA: 1s - loss: 10.1700 - acc: 0.3071 - ETA: 1s - loss: 9.9989 - acc: 0.3149  - ETA: 1s - loss: 9.8702 - acc: 0.3246 - ETA: 1s - loss: 9.7707 - acc: 0.3288 - ETA: 1s - loss: 9.8314 - acc: 0.3253 - ETA: 1s - loss: 9.8772 - acc: 0.3233 - ETA: 1s - loss: 9.9299 - acc: 0.3193 - ETA: 1s - loss: 9.9351 - acc: 0.3173 - ETA: 1s - loss: 10.0122 - acc: 0.3147 - ETA: 1s - loss: 10.0306 - acc: 0.3121 - ETA: 1s - loss: 10.0252 - acc: 0.3113 - ETA: 1s - loss: 10.0361 - acc: 0.3122 - ETA: 1s - loss: 9.9637 - acc: 0.3164  - ETA: 1s - loss: 9.9341 - acc: 0.3169 - ETA: 1s - loss: 9.9754 - acc: 0.3154 - ETA: 1s - loss: 9.9598 - acc: 0.3162 - ETA: 1s - loss: 9.9923 - acc: 0.3143 - ETA: 1s - loss: 10.0070 - acc: 0.3131 - ETA: 0s - loss: 10.0065 - acc: 0.3137 - ETA: 0s - loss: 10.0054 - acc: 0.3141 - ETA: 0s - loss: 10.0035 - acc: 0.3153 - ETA: 0s - loss: 9.9979 - acc: 0.3157  - ETA: 0s - loss: 10.0078 - acc: 0.3155 - ETA: 0s - loss: 10.0328 - acc: 0.3142 - ETA: 0s - loss: 10.0187 - acc: 0.3152 - ETA: 0s - loss: 9.9908 - acc: 0.3171  - ETA: 0s - loss: 9.9777 - acc: 0.3184 - ETA: 0s - loss: 9.9611 - acc: 0.3177 - ETA: 0s - loss: 9.9633 - acc: 0.3174 - ETA: 0s - loss: 9.9989 - acc: 0.3158 - ETA: 0s - loss: 10.0017 - acc: 0.3157 - ETA: 0s - loss: 9.9945 - acc: 0.3163  - ETA: 0s - loss: 10.0190 - acc: 0.3151 - ETA: 0s - loss: 10.0374 - acc: 0.3140 - ETA: 0s - loss: 10.0159 - acc: 0.3162 - ETA: 0s - loss: 10.0032 - acc: 0.3166 - ETA: 0s - loss: 9.9638 - acc: 0.3192 Epoch 00002: val_loss improved from 10.42291 to 10.14469, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 9.9522 - acc: 0.3196 - val_loss: 10.1447 - val_acc: 0.2790
Epoch 4/20
6640/6680 [============================>.] - ETA: 2s - loss: 9.1145 - acc: 0.4000 - ETA: 2s - loss: 9.3734 - acc: 0.3625 - ETA: 2s - loss: 9.7664 - acc: 0.3433 - ETA: 2s - loss: 10.0564 - acc: 0.3273 - ETA: 2s - loss: 9.7093 - acc: 0.3500  - ETA: 2s - loss: 9.6432 - acc: 0.3486 - ETA: 2s - loss: 9.5525 - acc: 0.3535 - ETA: 2s - loss: 9.5988 - acc: 0.3490 - ETA: 2s - loss: 9.7098 - acc: 0.3447 - ETA: 2s - loss: 9.7604 - acc: 0.3406 - ETA: 1s - loss: 9.6921 - acc: 0.3458 - ETA: 1s - loss: 9.7164 - acc: 0.3462 - ETA: 1s - loss: 9.7627 - acc: 0.3435 - ETA: 1s - loss: 9.7918 - acc: 0.3429 - ETA: 1s - loss: 9.7585 - acc: 0.3465 - ETA: 1s - loss: 9.7839 - acc: 0.3434 - ETA: 1s - loss: 9.7280 - acc: 0.3460 - ETA: 1s - loss: 9.7295 - acc: 0.3479 - ETA: 1s - loss: 9.6794 - acc: 0.3496 - ETA: 1s - loss: 9.6784 - acc: 0.3500 - ETA: 1s - loss: 9.7242 - acc: 0.3483 - ETA: 1s - loss: 9.6972 - acc: 0.3483 - ETA: 1s - loss: 9.6997 - acc: 0.3468 - ETA: 1s - loss: 9.7269 - acc: 0.3463 - ETA: 1s - loss: 9.6582 - acc: 0.3506 - ETA: 1s - loss: 9.6713 - acc: 0.3492 - ETA: 1s - loss: 9.6859 - acc: 0.3492 - ETA: 1s - loss: 9.7052 - acc: 0.3472 - ETA: 0s - loss: 9.7024 - acc: 0.3475 - ETA: 0s - loss: 9.7145 - acc: 0.3472 - ETA: 0s - loss: 9.6992 - acc: 0.3473 - ETA: 0s - loss: 9.6988 - acc: 0.3471 - ETA: 0s - loss: 9.6972 - acc: 0.3464 - ETA: 0s - loss: 9.6885 - acc: 0.3471 - ETA: 0s - loss: 9.6810 - acc: 0.3476 - ETA: 0s - loss: 9.7040 - acc: 0.3467 - ETA: 0s - loss: 9.6998 - acc: 0.3470 - ETA: 0s - loss: 9.7087 - acc: 0.3469 - ETA: 0s - loss: 9.7275 - acc: 0.3459 - ETA: 0s - loss: 9.7346 - acc: 0.3449 - ETA: 0s - loss: 9.7327 - acc: 0.3444 - ETA: 0s - loss: 9.7112 - acc: 0.3462 - ETA: 0s - loss: 9.6964 - acc: 0.3476 - ETA: 0s - loss: 9.7105 - acc: 0.3475 - ETA: 0s - loss: 9.7123 - acc: 0.3475 - ETA: 0s - loss: 9.7126 - acc: 0.3480Epoch 00003: val_loss improved from 10.14469 to 10.02995, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 9.7060 - acc: 0.3484 - val_loss: 10.0299 - val_acc: 0.2970
Epoch 5/20
6600/6680 [============================>.] - ETA: 2s - loss: 8.0723 - acc: 0.5000 - ETA: 2s - loss: 9.1271 - acc: 0.3722 - ETA: 2s - loss: 9.0728 - acc: 0.3735 - ETA: 2s - loss: 9.0962 - acc: 0.3750 - ETA: 2s - loss: 9.1033 - acc: 0.3806 - ETA: 2s - loss: 9.0609 - acc: 0.3868 - ETA: 2s - loss: 9.1017 - acc: 0.3844 - ETA: 2s - loss: 9.2539 - acc: 0.3788 - ETA: 2s - loss: 9.3807 - acc: 0.3720 - ETA: 1s - loss: 9.4851 - acc: 0.3667 - ETA: 1s - loss: 9.4627 - acc: 0.3685 - ETA: 1s - loss: 9.4147 - acc: 0.3722 - ETA: 1s - loss: 9.3894 - acc: 0.3753 - ETA: 1s - loss: 9.3862 - acc: 0.3750 - ETA: 1s - loss: 9.3789 - acc: 0.3755 - ETA: 1s - loss: 9.3307 - acc: 0.3779 - ETA: 1s - loss: 9.3747 - acc: 0.3763 - ETA: 1s - loss: 9.3862 - acc: 0.3752 - ETA: 1s - loss: 9.4700 - acc: 0.3708 - ETA: 1s - loss: 9.5221 - acc: 0.3680 - ETA: 1s - loss: 9.5445 - acc: 0.3663 - ETA: 1s - loss: 9.5040 - acc: 0.3697 - ETA: 1s - loss: 9.5061 - acc: 0.3706 - ETA: 1s - loss: 9.4870 - acc: 0.3721 - ETA: 1s - loss: 9.5216 - acc: 0.3702 - ETA: 1s - loss: 9.4714 - acc: 0.3731 - ETA: 1s - loss: 9.4849 - acc: 0.3723 - ETA: 0s - loss: 9.4806 - acc: 0.3724 - ETA: 0s - loss: 9.4897 - acc: 0.3726 - ETA: 0s - loss: 9.4968 - acc: 0.3721 - ETA: 0s - loss: 9.5167 - acc: 0.3716 - ETA: 0s - loss: 9.4875 - acc: 0.3740 - ETA: 0s - loss: 9.4755 - acc: 0.3754 - ETA: 0s - loss: 9.4812 - acc: 0.3753 - ETA: 0s - loss: 9.4863 - acc: 0.3754 - ETA: 0s - loss: 9.5227 - acc: 0.3735 - ETA: 0s - loss: 9.5271 - acc: 0.3734 - ETA: 0s - loss: 9.5406 - acc: 0.3724 - ETA: 0s - loss: 9.5328 - acc: 0.3728 - ETA: 0s - loss: 9.5149 - acc: 0.3740 - ETA: 0s - loss: 9.5318 - acc: 0.3728 - ETA: 0s - loss: 9.5123 - acc: 0.3742 - ETA: 0s - loss: 9.5059 - acc: 0.3743 - ETA: 0s - loss: 9.5129 - acc: 0.3739 - ETA: 0s - loss: 9.5458 - acc: 0.3718 - ETA: 0s - loss: 9.5679 - acc: 0.3702Epoch 00004: val_loss improved from 10.02995 to 9.90682, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 9.5633 - acc: 0.3705 - val_loss: 9.9068 - val_acc: 0.3174
Epoch 6/20
6620/6680 [============================>.] - ETA: 2s - loss: 6.5103 - acc: 0.5500 - ETA: 2s - loss: 9.1360 - acc: 0.4125 - ETA: 2s - loss: 9.2606 - acc: 0.4000 - ETA: 2s - loss: 9.5434 - acc: 0.3818 - ETA: 2s - loss: 9.6188 - acc: 0.3707 - ETA: 2s - loss: 9.6420 - acc: 0.3708 - ETA: 2s - loss: 9.5392 - acc: 0.3779 - ETA: 2s - loss: 9.3713 - acc: 0.3860 - ETA: 2s - loss: 9.4624 - acc: 0.3816 - ETA: 1s - loss: 9.5283 - acc: 0.3762 - ETA: 1s - loss: 9.5130 - acc: 0.3771 - ETA: 1s - loss: 9.4276 - acc: 0.3806 - ETA: 1s - loss: 9.3928 - acc: 0.3856 - ETA: 1s - loss: 9.3042 - acc: 0.3900 - ETA: 1s - loss: 9.2842 - acc: 0.3917 - ETA: 1s - loss: 9.2134 - acc: 0.3964 - ETA: 1s - loss: 9.1453 - acc: 0.4025 - ETA: 1s - loss: 9.0967 - acc: 0.4060 - ETA: 1s - loss: 9.1672 - acc: 0.3996 - ETA: 1s - loss: 9.1994 - acc: 0.3989 - ETA: 1s - loss: 9.1758 - acc: 0.4010 - ETA: 1s - loss: 9.1892 - acc: 0.3990 - ETA: 1s - loss: 9.2199 - acc: 0.3972 - ETA: 1s - loss: 9.2404 - acc: 0.3962 - ETA: 1s - loss: 9.2396 - acc: 0.3961 - ETA: 1s - loss: 9.2004 - acc: 0.3976 - ETA: 1s - loss: 9.1758 - acc: 0.3987 - ETA: 0s - loss: 9.2219 - acc: 0.3957 - ETA: 0s - loss: 9.1957 - acc: 0.3976 - ETA: 0s - loss: 9.2063 - acc: 0.3970 - ETA: 0s - loss: 9.2044 - acc: 0.3971 - ETA: 0s - loss: 9.2419 - acc: 0.3948 - ETA: 0s - loss: 9.2447 - acc: 0.3949 - ETA: 0s - loss: 9.2723 - acc: 0.3934 - ETA: 0s - loss: 9.2693 - acc: 0.3940 - ETA: 0s - loss: 9.2807 - acc: 0.3938 - ETA: 0s - loss: 9.2636 - acc: 0.3951 - ETA: 0s - loss: 9.2676 - acc: 0.3954 - ETA: 0s - loss: 9.2795 - acc: 0.3950 - ETA: 0s - loss: 9.3166 - acc: 0.3930 - ETA: 0s - loss: 9.3449 - acc: 0.3914 - ETA: 0s - loss: 9.3398 - acc: 0.3909 - ETA: 0s - loss: 9.3314 - acc: 0.3914 - ETA: 0s - loss: 9.3378 - acc: 0.3907 - ETA: 0s - loss: 9.3574 - acc: 0.3898 - ETA: 0s - loss: 9.3777 - acc: 0.3885Epoch 00005: val_loss improved from 9.90682 to 9.81339, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 9.3840 - acc: 0.3882 - val_loss: 9.8134 - val_acc: 0.3246
Epoch 7/20
6660/6680 [============================>.] - ETA: 2s - loss: 9.6709 - acc: 0.4000 - ETA: 2s - loss: 8.8078 - acc: 0.4438 - ETA: 2s - loss: 8.3644 - acc: 0.4688 - ETA: 2s - loss: 8.9624 - acc: 0.4304 - ETA: 2s - loss: 8.9501 - acc: 0.4300 - ETA: 2s - loss: 9.0006 - acc: 0.4263 - ETA: 2s - loss: 9.0240 - acc: 0.4267 - ETA: 2s - loss: 9.2077 - acc: 0.4163 - ETA: 1s - loss: 9.2553 - acc: 0.4136 - ETA: 1s - loss: 9.1634 - acc: 0.4194 - ETA: 1s - loss: 9.1606 - acc: 0.4196 - ETA: 1s - loss: 9.2512 - acc: 0.4136 - ETA: 1s - loss: 9.2633 - acc: 0.4114 - ETA: 1s - loss: 9.3441 - acc: 0.4063 - ETA: 1s - loss: 9.2864 - acc: 0.4091 - ETA: 1s - loss: 9.2612 - acc: 0.4104 - ETA: 1s - loss: 9.2589 - acc: 0.4110 - ETA: 1s - loss: 9.2152 - acc: 0.4131 - ETA: 1s - loss: 9.2393 - acc: 0.4112 - ETA: 1s - loss: 9.2603 - acc: 0.4096 - ETA: 1s - loss: 9.2945 - acc: 0.4068 - ETA: 1s - loss: 9.3006 - acc: 0.4052 - ETA: 1s - loss: 9.3242 - acc: 0.4028 - ETA: 1s - loss: 9.3061 - acc: 0.4029 - ETA: 1s - loss: 9.2871 - acc: 0.4034 - ETA: 1s - loss: 9.2854 - acc: 0.4024 - ETA: 1s - loss: 9.3212 - acc: 0.4000 - ETA: 0s - loss: 9.3121 - acc: 0.4008 - ETA: 0s - loss: 9.3085 - acc: 0.4000 - ETA: 0s - loss: 9.3303 - acc: 0.3984 - ETA: 0s - loss: 9.3093 - acc: 0.3989 - ETA: 0s - loss: 9.3260 - acc: 0.3978 - ETA: 0s - loss: 9.3393 - acc: 0.3973 - ETA: 0s - loss: 9.3254 - acc: 0.3982 - ETA: 0s - loss: 9.3079 - acc: 0.3990 - ETA: 0s - loss: 9.3294 - acc: 0.3973 - ETA: 0s - loss: 9.3082 - acc: 0.3983 - ETA: 0s - loss: 9.3206 - acc: 0.3973 - ETA: 0s - loss: 9.2931 - acc: 0.3988 - ETA: 0s - loss: 9.2694 - acc: 0.3997 - ETA: 0s - loss: 9.2667 - acc: 0.4002 - ETA: 0s - loss: 9.2612 - acc: 0.4005 - ETA: 0s - loss: 9.2835 - acc: 0.3994 - ETA: 0s - loss: 9.2898 - acc: 0.3992 - ETA: 0s - loss: 9.2863 - acc: 0.3992Epoch 00006: val_loss improved from 9.81339 to 9.80701, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 9.2806 - acc: 0.3996 - val_loss: 9.8070 - val_acc: 0.3222
Epoch 8/20
6640/6680 [============================>.] - ETA: 2s - loss: 11.2912 - acc: 0.3000 - ETA: 2s - loss: 9.6301 - acc: 0.3875  - ETA: 2s - loss: 9.6962 - acc: 0.3867 - ETA: 2s - loss: 9.8639 - acc: 0.3705 - ETA: 2s - loss: 9.7736 - acc: 0.3759 - ETA: 2s - loss: 9.4576 - acc: 0.3944 - ETA: 2s - loss: 9.4827 - acc: 0.3930 - ETA: 2s - loss: 9.4824 - acc: 0.3940 - ETA: 2s - loss: 9.4788 - acc: 0.3956 - ETA: 2s - loss: 9.4676 - acc: 0.3969 - ETA: 2s - loss: 9.4236 - acc: 0.4007 - ETA: 2s - loss: 9.4044 - acc: 0.4000 - ETA: 1s - loss: 9.3900 - acc: 0.4006 - ETA: 1s - loss: 9.3224 - acc: 0.4043 - ETA: 1s - loss: 9.4032 - acc: 0.4000 - ETA: 1s - loss: 9.4203 - acc: 0.3977 - ETA: 1s - loss: 9.3665 - acc: 0.4013 - ETA: 1s - loss: 9.3435 - acc: 0.4028 - ETA: 1s - loss: 9.2604 - acc: 0.4076 - ETA: 1s - loss: 9.2497 - acc: 0.4086 - ETA: 1s - loss: 9.2748 - acc: 0.4071 - ETA: 1s - loss: 9.2466 - acc: 0.4084 - ETA: 1s - loss: 9.2158 - acc: 0.4106 - ETA: 1s - loss: 9.1909 - acc: 0.4112 - ETA: 1s - loss: 9.1312 - acc: 0.4142 - ETA: 1s - loss: 9.1949 - acc: 0.4101 - ETA: 1s - loss: 9.1699 - acc: 0.4115 - ETA: 0s - loss: 9.1533 - acc: 0.4126 - ETA: 0s - loss: 9.1242 - acc: 0.4143 - ETA: 0s - loss: 9.1430 - acc: 0.4131 - ETA: 0s - loss: 9.1528 - acc: 0.4120 - ETA: 0s - loss: 9.1631 - acc: 0.4111 - ETA: 0s - loss: 9.1556 - acc: 0.4117 - ETA: 0s - loss: 9.1521 - acc: 0.4113 - ETA: 0s - loss: 9.1602 - acc: 0.4102 - ETA: 0s - loss: 9.1723 - acc: 0.4097 - ETA: 0s - loss: 9.1594 - acc: 0.4102 - ETA: 0s - loss: 9.1411 - acc: 0.4118 - ETA: 0s - loss: 9.1345 - acc: 0.4109 - ETA: 0s - loss: 9.1270 - acc: 0.4113 - ETA: 0s - loss: 9.1084 - acc: 0.4128 - ETA: 0s - loss: 9.0648 - acc: 0.4154 - ETA: 0s - loss: 9.0516 - acc: 0.4163 - ETA: 0s - loss: 9.0458 - acc: 0.4169 - ETA: 0s - loss: 9.0118 - acc: 0.4185 - ETA: 0s - loss: 9.0318 - acc: 0.4176Epoch 00007: val_loss improved from 9.80701 to 9.53608, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 9.0334 - acc: 0.4175 - val_loss: 9.5361 - val_acc: 0.3353
Epoch 9/20
6600/6680 [============================>.] - ETA: 2s - loss: 9.2420 - acc: 0.4000 - ETA: 2s - loss: 8.5634 - acc: 0.4444 - ETA: 2s - loss: 8.6921 - acc: 0.4375 - ETA: 2s - loss: 8.9405 - acc: 0.4261 - ETA: 2s - loss: 8.6018 - acc: 0.4452 - ETA: 2s - loss: 8.8202 - acc: 0.4316 - ETA: 2s - loss: 8.8848 - acc: 0.4300 - ETA: 2s - loss: 8.9697 - acc: 0.4250 - ETA: 2s - loss: 8.9342 - acc: 0.4280 - ETA: 1s - loss: 8.8462 - acc: 0.4326 - ETA: 1s - loss: 8.7774 - acc: 0.4370 - ETA: 1s - loss: 8.8909 - acc: 0.4294 - ETA: 1s - loss: 8.8691 - acc: 0.4305 - ETA: 1s - loss: 8.8530 - acc: 0.4314 - ETA: 1s - loss: 8.8882 - acc: 0.4299 - ETA: 1s - loss: 8.8673 - acc: 0.4317 - ETA: 1s - loss: 8.8626 - acc: 0.4329 - ETA: 1s - loss: 8.8715 - acc: 0.4332 - ETA: 1s - loss: 8.9038 - acc: 0.4311 - ETA: 1s - loss: 8.8967 - acc: 0.4317 - ETA: 1s - loss: 8.9319 - acc: 0.4299 - ETA: 1s - loss: 8.8741 - acc: 0.4332 - ETA: 1s - loss: 8.8961 - acc: 0.4320 - ETA: 1s - loss: 8.8326 - acc: 0.4346 - ETA: 1s - loss: 8.8408 - acc: 0.4342 - ETA: 1s - loss: 8.8485 - acc: 0.4340 - ETA: 1s - loss: 8.8732 - acc: 0.4325 - ETA: 0s - loss: 8.8297 - acc: 0.4349 - ETA: 0s - loss: 8.8228 - acc: 0.4352 - ETA: 0s - loss: 8.8530 - acc: 0.4329 - ETA: 0s - loss: 8.8827 - acc: 0.4307 - ETA: 0s - loss: 8.8723 - acc: 0.4315 - ETA: 0s - loss: 8.8891 - acc: 0.4303 - ETA: 0s - loss: 8.8850 - acc: 0.4301 - ETA: 0s - loss: 8.8570 - acc: 0.4310 - ETA: 0s - loss: 8.8736 - acc: 0.4304 - ETA: 0s - loss: 8.8656 - acc: 0.4311 - ETA: 0s - loss: 8.8601 - acc: 0.4314 - ETA: 0s - loss: 8.8630 - acc: 0.4316 - ETA: 0s - loss: 8.8381 - acc: 0.4335 - ETA: 0s - loss: 8.8422 - acc: 0.4333 - ETA: 0s - loss: 8.8431 - acc: 0.4331 - ETA: 0s - loss: 8.8484 - acc: 0.4329 - ETA: 0s - loss: 8.8373 - acc: 0.4340 - ETA: 0s - loss: 8.8601 - acc: 0.4328 - ETA: 0s - loss: 8.8412 - acc: 0.4338Epoch 00008: val_loss improved from 9.53608 to 9.42293, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 8.8530 - acc: 0.4328 - val_loss: 9.4229 - val_acc: 0.3437
Epoch 10/20
6560/6680 [============================>.] - ETA: 2s - loss: 6.4536 - acc: 0.6000 - ETA: 2s - loss: 8.1632 - acc: 0.4938 - ETA: 2s - loss: 7.6076 - acc: 0.5167 - ETA: 2s - loss: 7.9766 - acc: 0.4909 - ETA: 2s - loss: 8.2280 - acc: 0.4750 - ETA: 2s - loss: 8.2723 - acc: 0.4697 - ETA: 2s - loss: 8.3974 - acc: 0.4611 - ETA: 2s - loss: 8.2805 - acc: 0.4689 - ETA: 1s - loss: 8.2926 - acc: 0.4697 - ETA: 1s - loss: 8.2893 - acc: 0.4691 - ETA: 1s - loss: 8.4191 - acc: 0.4625 - ETA: 1s - loss: 8.5165 - acc: 0.4548 - ETA: 1s - loss: 8.4719 - acc: 0.4587 - ETA: 1s - loss: 8.5076 - acc: 0.4565 - ETA: 1s - loss: 8.5183 - acc: 0.4565 - ETA: 1s - loss: 8.5875 - acc: 0.4526 - ETA: 1s - loss: 8.5377 - acc: 0.4552 - ETA: 1s - loss: 8.5802 - acc: 0.4523 - ETA: 1s - loss: 8.6170 - acc: 0.4500 - ETA: 1s - loss: 8.5835 - acc: 0.4520 - ETA: 1s - loss: 8.5935 - acc: 0.4516 - ETA: 1s - loss: 8.6028 - acc: 0.4515 - ETA: 1s - loss: 8.6387 - acc: 0.4482 - ETA: 1s - loss: 8.6405 - acc: 0.4480 - ETA: 1s - loss: 8.6398 - acc: 0.4473 - ETA: 0s - loss: 8.6588 - acc: 0.4464 - ETA: 0s - loss: 8.6684 - acc: 0.4458 - ETA: 0s - loss: 8.7050 - acc: 0.4423 - ETA: 0s - loss: 8.6757 - acc: 0.4440 - ETA: 0s - loss: 8.6692 - acc: 0.4446 - ETA: 0s - loss: 8.6904 - acc: 0.4433 - ETA: 0s - loss: 8.6809 - acc: 0.4435 - ETA: 0s - loss: 8.6973 - acc: 0.4419 - ETA: 0s - loss: 8.6914 - acc: 0.4425 - ETA: 0s - loss: 8.6707 - acc: 0.4439 - ETA: 0s - loss: 8.6714 - acc: 0.4435 - ETA: 0s - loss: 8.6936 - acc: 0.4418 - ETA: 0s - loss: 8.7060 - acc: 0.4408 - ETA: 0s - loss: 8.6870 - acc: 0.4421 - ETA: 0s - loss: 8.7128 - acc: 0.4408 - ETA: 0s - loss: 8.7151 - acc: 0.4408 - ETA: 0s - loss: 8.7171 - acc: 0.4409 - ETA: 0s - loss: 8.7222 - acc: 0.4407 - ETA: 0s - loss: 8.7381 - acc: 0.4399Epoch 00009: val_loss improved from 9.42293 to 9.32971, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 8.7098 - acc: 0.4415 - val_loss: 9.3297 - val_acc: 0.3401
Epoch 11/20
6620/6680 [============================>.] - ETA: 2s - loss: 6.4472 - acc: 0.6000 - ETA: 2s - loss: 8.8706 - acc: 0.4500 - ETA: 2s - loss: 9.0834 - acc: 0.4367 - ETA: 2s - loss: 8.3268 - acc: 0.4795 - ETA: 2s - loss: 8.6271 - acc: 0.4603 - ETA: 2s - loss: 8.7473 - acc: 0.4528 - ETA: 2s - loss: 8.6765 - acc: 0.4570 - ETA: 2s - loss: 8.7417 - acc: 0.4520 - ETA: 2s - loss: 8.7944 - acc: 0.4456 - ETA: 2s - loss: 8.7302 - acc: 0.4484 - ETA: 1s - loss: 8.7273 - acc: 0.4493 - ETA: 1s - loss: 8.6515 - acc: 0.4544 - ETA: 1s - loss: 8.5829 - acc: 0.4574 - ETA: 1s - loss: 8.6470 - acc: 0.4537 - ETA: 1s - loss: 8.5177 - acc: 0.4613 - ETA: 1s - loss: 8.5271 - acc: 0.4606 - ETA: 1s - loss: 8.5663 - acc: 0.4578 - ETA: 1s - loss: 8.5523 - acc: 0.4573 - ETA: 1s - loss: 8.6057 - acc: 0.4534 - ETA: 1s - loss: 8.6750 - acc: 0.4489 - ETA: 1s - loss: 8.6779 - acc: 0.4486 - ETA: 1s - loss: 8.6871 - acc: 0.4481 - ETA: 1s - loss: 8.7063 - acc: 0.4469 - ETA: 1s - loss: 8.6612 - acc: 0.4500 - ETA: 1s - loss: 8.6119 - acc: 0.4531 - ETA: 1s - loss: 8.6442 - acc: 0.4514 - ETA: 1s - loss: 8.6535 - acc: 0.4511 - ETA: 1s - loss: 8.6276 - acc: 0.4525 - ETA: 0s - loss: 8.6380 - acc: 0.4520 - ETA: 0s - loss: 8.6385 - acc: 0.4519 - ETA: 0s - loss: 8.6321 - acc: 0.4523 - ETA: 0s - loss: 8.6462 - acc: 0.4511 - ETA: 0s - loss: 8.6447 - acc: 0.4511 - ETA: 0s - loss: 8.6436 - acc: 0.4510 - ETA: 0s - loss: 8.6455 - acc: 0.4504 - ETA: 0s - loss: 8.6429 - acc: 0.4508 - ETA: 0s - loss: 8.6073 - acc: 0.4530 - ETA: 0s - loss: 8.6303 - acc: 0.4518 - ETA: 0s - loss: 8.6261 - acc: 0.4523 - ETA: 0s - loss: 8.6223 - acc: 0.4528 - ETA: 0s - loss: 8.5982 - acc: 0.4546 - ETA: 0s - loss: 8.5930 - acc: 0.4546 - ETA: 0s - loss: 8.5916 - acc: 0.4545 - ETA: 0s - loss: 8.6181 - acc: 0.4532 - ETA: 0s - loss: 8.6215 - acc: 0.4529 - ETA: 0s - loss: 8.6350 - acc: 0.4521Epoch 00010: val_loss improved from 9.32971 to 9.25877, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 8.6322 - acc: 0.4524 - val_loss: 9.2588 - val_acc: 0.3533
Epoch 12/20
6600/6680 [============================>.] - ETA: 2s - loss: 7.6138 - acc: 0.5000 - ETA: 2s - loss: 8.5150 - acc: 0.4688 - ETA: 2s - loss: 8.2011 - acc: 0.4900 - ETA: 2s - loss: 8.6353 - acc: 0.4614 - ETA: 2s - loss: 8.6548 - acc: 0.4586 - ETA: 2s - loss: 8.4534 - acc: 0.4694 - ETA: 2s - loss: 8.4876 - acc: 0.4674 - ETA: 2s - loss: 8.5174 - acc: 0.4657 - ETA: 2s - loss: 8.6564 - acc: 0.4559 - ETA: 1s - loss: 8.6498 - acc: 0.4552 - ETA: 1s - loss: 8.5444 - acc: 0.4600 - ETA: 1s - loss: 8.6147 - acc: 0.4566 - ETA: 1s - loss: 8.6258 - acc: 0.4567 - ETA: 1s - loss: 8.6758 - acc: 0.4526 - ETA: 1s - loss: 8.7105 - acc: 0.4500 - ETA: 1s - loss: 8.6934 - acc: 0.4518 - ETA: 1s - loss: 8.6805 - acc: 0.4529 - ETA: 1s - loss: 8.6614 - acc: 0.4546 - ETA: 1s - loss: 8.6146 - acc: 0.4569 - ETA: 1s - loss: 8.5980 - acc: 0.4579 - ETA: 1s - loss: 8.6063 - acc: 0.4572 - ETA: 1s - loss: 8.6099 - acc: 0.4569 - ETA: 1s - loss: 8.6030 - acc: 0.4572 - ETA: 1s - loss: 8.5613 - acc: 0.4592 - ETA: 1s - loss: 8.5651 - acc: 0.4589 - ETA: 1s - loss: 8.5509 - acc: 0.4599 - ETA: 0s - loss: 8.5264 - acc: 0.4618 - ETA: 0s - loss: 8.5582 - acc: 0.4597 - ETA: 0s - loss: 8.5392 - acc: 0.4610 - ETA: 0s - loss: 8.4852 - acc: 0.4641 - ETA: 0s - loss: 8.5341 - acc: 0.4607 - ETA: 0s - loss: 8.5372 - acc: 0.4603 - ETA: 0s - loss: 8.5220 - acc: 0.4615 - ETA: 0s - loss: 8.5447 - acc: 0.4599 - ETA: 0s - loss: 8.5220 - acc: 0.4612 - ETA: 0s - loss: 8.5169 - acc: 0.4613 - ETA: 0s - loss: 8.5427 - acc: 0.4599 - ETA: 0s - loss: 8.5727 - acc: 0.4582 - ETA: 0s - loss: 8.5983 - acc: 0.4567 - ETA: 0s - loss: 8.6113 - acc: 0.4559 - ETA: 0s - loss: 8.5767 - acc: 0.4576 - ETA: 0s - loss: 8.5983 - acc: 0.4560 - ETA: 0s - loss: 8.5936 - acc: 0.4554 - ETA: 0s - loss: 8.5880 - acc: 0.4554 - ETA: 0s - loss: 8.5784 - acc: 0.4561Epoch 00011: val_loss improved from 9.25877 to 9.18431, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 8.5918 - acc: 0.4552 - val_loss: 9.1843 - val_acc: 0.3557
Epoch 13/20
6660/6680 [============================>.] - ETA: 2s - loss: 9.9554 - acc: 0.3000 - ETA: 2s - loss: 8.7234 - acc: 0.4438 - ETA: 2s - loss: 8.0330 - acc: 0.4767 - ETA: 2s - loss: 8.2872 - acc: 0.4636 - ETA: 2s - loss: 8.3217 - acc: 0.4586 - ETA: 2s - loss: 8.1946 - acc: 0.4689 - ETA: 2s - loss: 8.1821 - acc: 0.4693 - ETA: 2s - loss: 8.1582 - acc: 0.4683 - ETA: 1s - loss: 8.1951 - acc: 0.4661 - ETA: 1s - loss: 8.1101 - acc: 0.4727 - ETA: 1s - loss: 8.1516 - acc: 0.4719 - ETA: 1s - loss: 8.2261 - acc: 0.4685 - ETA: 1s - loss: 8.3285 - acc: 0.4631 - ETA: 1s - loss: 8.2092 - acc: 0.4711 - ETA: 1s - loss: 8.2293 - acc: 0.4709 - ETA: 1s - loss: 8.2710 - acc: 0.4689 - ETA: 1s - loss: 8.2927 - acc: 0.4681 - ETA: 1s - loss: 8.3811 - acc: 0.4623 - ETA: 1s - loss: 8.3221 - acc: 0.4669 - ETA: 1s - loss: 8.3390 - acc: 0.4661 - ETA: 1s - loss: 8.2720 - acc: 0.4703 - ETA: 1s - loss: 8.2800 - acc: 0.4690 - ETA: 1s - loss: 8.3446 - acc: 0.4645 - ETA: 1s - loss: 8.3432 - acc: 0.4651 - ETA: 1s - loss: 8.3181 - acc: 0.4672 - ETA: 1s - loss: 8.3486 - acc: 0.4657 - ETA: 1s - loss: 8.3235 - acc: 0.4674 - ETA: 0s - loss: 8.3269 - acc: 0.4670 - ETA: 0s - loss: 8.3299 - acc: 0.4669 - ETA: 0s - loss: 8.3552 - acc: 0.4654 - ETA: 0s - loss: 8.3673 - acc: 0.4642 - ETA: 0s - loss: 8.3895 - acc: 0.4630 - ETA: 0s - loss: 8.4071 - acc: 0.4624 - ETA: 0s - loss: 8.3883 - acc: 0.4633 - ETA: 0s - loss: 8.3723 - acc: 0.4640 - ETA: 0s - loss: 8.3615 - acc: 0.4643 - ETA: 0s - loss: 8.3582 - acc: 0.4646 - ETA: 0s - loss: 8.3530 - acc: 0.4647 - ETA: 0s - loss: 8.3742 - acc: 0.4631 - ETA: 0s - loss: 8.3710 - acc: 0.4633 - ETA: 0s - loss: 8.3659 - acc: 0.4640 - ETA: 0s - loss: 8.3557 - acc: 0.4644 - ETA: 0s - loss: 8.3725 - acc: 0.4632 - ETA: 0s - loss: 8.3734 - acc: 0.4628 - ETA: 0s - loss: 8.3844 - acc: 0.4620Epoch 00012: val_loss improved from 9.18431 to 9.00346, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 8.3787 - acc: 0.4624 - val_loss: 9.0035 - val_acc: 0.3689
Epoch 14/20
6520/6680 [============================>.] - ETA: 2s - loss: 6.4517 - acc: 0.6000 - ETA: 2s - loss: 9.0658 - acc: 0.4125 - ETA: 2s - loss: 8.4100 - acc: 0.4600 - ETA: 2s - loss: 8.0356 - acc: 0.4795 - ETA: 2s - loss: 7.9203 - acc: 0.4914 - ETA: 2s - loss: 8.0335 - acc: 0.4833 - ETA: 2s - loss: 8.1208 - acc: 0.4791 - ETA: 2s - loss: 8.2580 - acc: 0.4730 - ETA: 2s - loss: 8.2458 - acc: 0.4759 - ETA: 1s - loss: 8.2472 - acc: 0.4758 - ETA: 1s - loss: 8.2404 - acc: 0.4774 - ETA: 1s - loss: 8.1346 - acc: 0.4844 - ETA: 1s - loss: 8.1686 - acc: 0.4822 - ETA: 1s - loss: 8.1944 - acc: 0.4803 - ETA: 1s - loss: 8.1650 - acc: 0.4817 - ETA: 1s - loss: 8.1880 - acc: 0.4807 - ETA: 1s - loss: 8.1241 - acc: 0.4846 - ETA: 1s - loss: 8.0631 - acc: 0.4887 - ETA: 1s - loss: 8.0977 - acc: 0.4866 - ETA: 1s - loss: 8.1318 - acc: 0.4848 - ETA: 1s - loss: 8.1290 - acc: 0.4853 - ETA: 1s - loss: 8.1037 - acc: 0.4869 - ETA: 1s - loss: 8.1274 - acc: 0.4859 - ETA: 1s - loss: 8.1814 - acc: 0.4821 - ETA: 1s - loss: 8.1457 - acc: 0.4843 - ETA: 1s - loss: 8.1690 - acc: 0.4832 - ETA: 1s - loss: 8.1397 - acc: 0.4854 - ETA: 1s - loss: 8.1207 - acc: 0.4865 - ETA: 0s - loss: 8.1305 - acc: 0.4862 - ETA: 0s - loss: 8.1283 - acc: 0.4867 - ETA: 0s - loss: 8.1247 - acc: 0.4864 - ETA: 0s - loss: 8.1231 - acc: 0.4868 - ETA: 0s - loss: 8.1117 - acc: 0.4877 - ETA: 0s - loss: 8.1265 - acc: 0.4870 - ETA: 0s - loss: 8.1681 - acc: 0.4845 - ETA: 0s - loss: 8.1528 - acc: 0.4855 - ETA: 0s - loss: 8.1477 - acc: 0.4861 - ETA: 0s - loss: 8.1283 - acc: 0.4872 - ETA: 0s - loss: 8.1360 - acc: 0.4866 - ETA: 0s - loss: 8.1463 - acc: 0.4861 - ETA: 0s - loss: 8.1472 - acc: 0.4859 - ETA: 0s - loss: 8.1644 - acc: 0.4847 - ETA: 0s - loss: 8.1584 - acc: 0.4848 - ETA: 0s - loss: 8.1723 - acc: 0.4840 - ETA: 0s - loss: 8.1827 - acc: 0.4833 - ETA: 0s - loss: 8.2041 - acc: 0.4822Epoch 00013: val_loss improved from 9.00346 to 8.87258, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 8.2186 - acc: 0.4811 - val_loss: 8.8726 - val_acc: 0.3796
Epoch 15/20
6580/6680 [============================>.] - ETA: 2s - loss: 6.5822 - acc: 0.5500 - ETA: 2s - loss: 7.4275 - acc: 0.5313 - ETA: 2s - loss: 8.1526 - acc: 0.4900 - ETA: 2s - loss: 8.4538 - acc: 0.4727 - ETA: 2s - loss: 8.4848 - acc: 0.4714 - ETA: 2s - loss: 8.8622 - acc: 0.4457 - ETA: 2s - loss: 8.4148 - acc: 0.4726 - ETA: 2s - loss: 8.3057 - acc: 0.4796 - ETA: 2s - loss: 8.2882 - acc: 0.4786 - ETA: 2s - loss: 8.2538 - acc: 0.4810 - ETA: 2s - loss: 8.2702 - acc: 0.4800 - ETA: 1s - loss: 8.2975 - acc: 0.4766 - ETA: 1s - loss: 8.2064 - acc: 0.4821 - ETA: 1s - loss: 8.1093 - acc: 0.4879 - ETA: 1s - loss: 8.1377 - acc: 0.4852 - ETA: 1s - loss: 8.1377 - acc: 0.4852 - ETA: 1s - loss: 8.1152 - acc: 0.4866 - ETA: 1s - loss: 8.1124 - acc: 0.4870 - ETA: 1s - loss: 8.2083 - acc: 0.4807 - ETA: 1s - loss: 8.2788 - acc: 0.4765 - ETA: 1s - loss: 8.2225 - acc: 0.4805 - ETA: 1s - loss: 8.2258 - acc: 0.4801 - ETA: 1s - loss: 8.1951 - acc: 0.4823 - ETA: 1s - loss: 8.2589 - acc: 0.4787 - ETA: 1s - loss: 8.2255 - acc: 0.4812 - ETA: 1s - loss: 8.2418 - acc: 0.4799 - ETA: 1s - loss: 8.2371 - acc: 0.4796 - ETA: 1s - loss: 8.2704 - acc: 0.4775 - ETA: 1s - loss: 8.2409 - acc: 0.4788 - ETA: 0s - loss: 8.1884 - acc: 0.4817 - ETA: 0s - loss: 8.2156 - acc: 0.4802 - ETA: 0s - loss: 8.2301 - acc: 0.4792 - ETA: 0s - loss: 8.1919 - acc: 0.4819 - ETA: 0s - loss: 8.2328 - acc: 0.4788 - ETA: 0s - loss: 8.2211 - acc: 0.4794 - ETA: 0s - loss: 8.1976 - acc: 0.4808 - ETA: 0s - loss: 8.1968 - acc: 0.4804 - ETA: 0s - loss: 8.2239 - acc: 0.4786 - ETA: 0s - loss: 8.2113 - acc: 0.4790 - ETA: 0s - loss: 8.1971 - acc: 0.4795 - ETA: 0s - loss: 8.1729 - acc: 0.4808 - ETA: 0s - loss: 8.1596 - acc: 0.4813 - ETA: 0s - loss: 8.1473 - acc: 0.4821 - ETA: 0s - loss: 8.1343 - acc: 0.4824 - ETA: 0s - loss: 8.1558 - acc: 0.4811 - ETA: 0s - loss: 8.1651 - acc: 0.4804 - ETA: 0s - loss: 8.1703 - acc: 0.4804Epoch 00014: val_loss improved from 8.87258 to 8.71688, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 8.1627 - acc: 0.4810 - val_loss: 8.7169 - val_acc: 0.3904
Epoch 16/20
6600/6680 [============================>.] - ETA: 2s - loss: 8.1029 - acc: 0.4500 - ETA: 2s - loss: 8.8458 - acc: 0.4333 - ETA: 2s - loss: 8.3295 - acc: 0.4594 - ETA: 2s - loss: 8.2320 - acc: 0.4652 - ETA: 2s - loss: 8.1654 - acc: 0.4733 - ETA: 2s - loss: 8.0319 - acc: 0.4824 - ETA: 2s - loss: 7.8732 - acc: 0.4943 - ETA: 2s - loss: 7.8285 - acc: 0.4961 - ETA: 2s - loss: 7.9225 - acc: 0.4888 - ETA: 2s - loss: 7.9157 - acc: 0.4908 - ETA: 1s - loss: 7.9206 - acc: 0.4917 - ETA: 1s - loss: 7.8424 - acc: 0.4968 - ETA: 1s - loss: 7.7707 - acc: 0.5012 - ETA: 1s - loss: 7.7733 - acc: 0.5000 - ETA: 1s - loss: 7.7964 - acc: 0.4990 - ETA: 1s - loss: 7.7375 - acc: 0.5028 - ETA: 1s - loss: 7.6680 - acc: 0.5074 - ETA: 1s - loss: 7.7054 - acc: 0.5045 - ETA: 1s - loss: 7.7674 - acc: 0.5004 - ETA: 1s - loss: 7.7671 - acc: 0.5011 - ETA: 1s - loss: 7.8191 - acc: 0.4979 - ETA: 1s - loss: 7.8174 - acc: 0.4974 - ETA: 1s - loss: 7.7864 - acc: 0.4991 - ETA: 1s - loss: 7.8145 - acc: 0.4979 - ETA: 1s - loss: 7.8337 - acc: 0.4963 - ETA: 1s - loss: 7.8587 - acc: 0.4948 - ETA: 1s - loss: 7.8189 - acc: 0.4968 - ETA: 1s - loss: 7.8572 - acc: 0.4944 - ETA: 0s - loss: 7.8518 - acc: 0.4951 - ETA: 0s - loss: 7.8659 - acc: 0.4943 - ETA: 0s - loss: 7.8616 - acc: 0.4950 - ETA: 0s - loss: 7.8799 - acc: 0.4938 - ETA: 0s - loss: 7.8952 - acc: 0.4931 - ETA: 0s - loss: 7.8527 - acc: 0.4950 - ETA: 0s - loss: 7.8661 - acc: 0.4940 - ETA: 0s - loss: 7.8599 - acc: 0.4945 - ETA: 0s - loss: 7.8755 - acc: 0.4933 - ETA: 0s - loss: 7.8784 - acc: 0.4931 - ETA: 0s - loss: 7.8659 - acc: 0.4940 - ETA: 0s - loss: 7.8531 - acc: 0.4949 - ETA: 0s - loss: 7.8674 - acc: 0.4943 - ETA: 0s - loss: 7.8611 - acc: 0.4948 - ETA: 0s - loss: 7.8777 - acc: 0.4933 - ETA: 0s - loss: 7.8955 - acc: 0.4924 - ETA: 0s - loss: 7.9020 - acc: 0.4922 - ETA: 0s - loss: 7.9228 - acc: 0.4909Epoch 00015: val_loss improved from 8.71688 to 8.64067, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 7.9108 - acc: 0.4916 - val_loss: 8.6407 - val_acc: 0.3856
Epoch 17/20
6600/6680 [============================>.] - ETA: 2s - loss: 8.0593 - acc: 0.5000 - ETA: 2s - loss: 8.1023 - acc: 0.4833 - ETA: 2s - loss: 7.8587 - acc: 0.5000 - ETA: 2s - loss: 8.0465 - acc: 0.4900 - ETA: 2s - loss: 7.9539 - acc: 0.4985 - ETA: 1s - loss: 7.6477 - acc: 0.5171 - ETA: 1s - loss: 7.6448 - acc: 0.5173 - ETA: 1s - loss: 7.6531 - acc: 0.5175 - ETA: 1s - loss: 7.7807 - acc: 0.5100 - ETA: 1s - loss: 7.8445 - acc: 0.5055 - ETA: 1s - loss: 7.7798 - acc: 0.5093 - ETA: 1s - loss: 7.7271 - acc: 0.5119 - ETA: 1s - loss: 7.7857 - acc: 0.5083 - ETA: 1s - loss: 7.7442 - acc: 0.5106 - ETA: 1s - loss: 7.6595 - acc: 0.5162 - ETA: 1s - loss: 7.6466 - acc: 0.5165 - ETA: 1s - loss: 7.6536 - acc: 0.5152 - ETA: 1s - loss: 7.6518 - acc: 0.5152 - ETA: 1s - loss: 7.6642 - acc: 0.5140 - ETA: 1s - loss: 7.6831 - acc: 0.5129 - ETA: 1s - loss: 7.7060 - acc: 0.5110 - ETA: 1s - loss: 7.7134 - acc: 0.5105 - ETA: 1s - loss: 7.7047 - acc: 0.5109 - ETA: 1s - loss: 7.6710 - acc: 0.5133 - ETA: 1s - loss: 7.6645 - acc: 0.5136 - ETA: 1s - loss: 7.6830 - acc: 0.5126 - ETA: 0s - loss: 7.6980 - acc: 0.5116 - ETA: 0s - loss: 7.6656 - acc: 0.5129 - ETA: 0s - loss: 7.6708 - acc: 0.5127 - ETA: 0s - loss: 7.6542 - acc: 0.5139 - ETA: 0s - loss: 7.6800 - acc: 0.5123 - ETA: 0s - loss: 7.6777 - acc: 0.5126 - ETA: 0s - loss: 7.6694 - acc: 0.5123 - ETA: 0s - loss: 7.6597 - acc: 0.5131 - ETA: 0s - loss: 7.6648 - acc: 0.5126 - ETA: 0s - loss: 7.6943 - acc: 0.5104 - ETA: 0s - loss: 7.7179 - acc: 0.5085 - ETA: 0s - loss: 7.7433 - acc: 0.5068 - ETA: 0s - loss: 7.7675 - acc: 0.5050 - ETA: 0s - loss: 7.7598 - acc: 0.5053 - ETA: 0s - loss: 7.7624 - acc: 0.5048 - ETA: 0s - loss: 7.7794 - acc: 0.5039 - ETA: 0s - loss: 7.7895 - acc: 0.5033 - ETA: 0s - loss: 7.7850 - acc: 0.5034 - ETA: 0s - loss: 7.7797 - acc: 0.5039Epoch 00016: val_loss improved from 8.64067 to 8.62813, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 7.7896 - acc: 0.5033 - val_loss: 8.6281 - val_acc: 0.3952
Epoch 18/20
6540/6680 [============================>.] - ETA: 2s - loss: 10.3070 - acc: 0.3500 - ETA: 2s - loss: 8.5668 - acc: 0.4563  - ETA: 2s - loss: 8.0966 - acc: 0.4800 - ETA: 2s - loss: 7.7075 - acc: 0.5068 - ETA: 2s - loss: 7.9053 - acc: 0.4966 - ETA: 2s - loss: 7.7911 - acc: 0.5056 - ETA: 2s - loss: 7.7856 - acc: 0.5023 - ETA: 2s - loss: 7.8171 - acc: 0.5000 - ETA: 2s - loss: 7.8242 - acc: 0.5008 - ETA: 1s - loss: 7.8627 - acc: 0.4992 - ETA: 1s - loss: 7.8835 - acc: 0.4986 - ETA: 1s - loss: 7.7998 - acc: 0.5044 - ETA: 1s - loss: 7.8499 - acc: 0.5017 - ETA: 1s - loss: 7.8596 - acc: 0.5005 - ETA: 1s - loss: 7.7650 - acc: 0.5054 - ETA: 1s - loss: 7.6910 - acc: 0.5110 - ETA: 1s - loss: 7.6497 - acc: 0.5141 - ETA: 1s - loss: 7.6705 - acc: 0.5132 - ETA: 1s - loss: 7.6671 - acc: 0.5128 - ETA: 1s - loss: 7.6802 - acc: 0.5124 - ETA: 1s - loss: 7.6347 - acc: 0.5157 - ETA: 1s - loss: 7.6273 - acc: 0.5161 - ETA: 1s - loss: 7.6434 - acc: 0.5157 - ETA: 1s - loss: 7.6545 - acc: 0.5149 - ETA: 1s - loss: 7.6884 - acc: 0.5126 - ETA: 1s - loss: 7.7002 - acc: 0.5121 - ETA: 0s - loss: 7.7161 - acc: 0.5111 - ETA: 0s - loss: 7.6763 - acc: 0.5133 - ETA: 0s - loss: 7.7079 - acc: 0.5117 - ETA: 0s - loss: 7.6945 - acc: 0.5123 - ETA: 0s - loss: 7.6854 - acc: 0.5130 - ETA: 0s - loss: 7.7174 - acc: 0.5113 - ETA: 0s - loss: 7.7211 - acc: 0.5112 - ETA: 0s - loss: 7.7586 - acc: 0.5088 - ETA: 0s - loss: 7.7426 - acc: 0.5098 - ETA: 0s - loss: 7.7200 - acc: 0.5112 - ETA: 0s - loss: 7.7269 - acc: 0.5107 - ETA: 0s - loss: 7.7220 - acc: 0.5110 - ETA: 0s - loss: 7.6904 - acc: 0.5132 - ETA: 0s - loss: 7.6646 - acc: 0.5146 - ETA: 0s - loss: 7.6857 - acc: 0.5130 - ETA: 0s - loss: 7.6841 - acc: 0.5134 - ETA: 0s - loss: 7.6954 - acc: 0.5128 - ETA: 0s - loss: 7.6858 - acc: 0.5130 - ETA: 0s - loss: 7.7162 - acc: 0.5110Epoch 00017: val_loss improved from 8.62813 to 8.49031, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 7.7022 - acc: 0.5115 - val_loss: 8.4903 - val_acc: 0.4060
Epoch 19/20
6600/6680 [============================>.] - ETA: 2s - loss: 7.5108 - acc: 0.5000 - ETA: 2s - loss: 7.4465 - acc: 0.5250 - ETA: 2s - loss: 7.4106 - acc: 0.5333 - ETA: 2s - loss: 7.5665 - acc: 0.5182 - ETA: 2s - loss: 7.4937 - acc: 0.5241 - ETA: 2s - loss: 7.4699 - acc: 0.5278 - ETA: 2s - loss: 7.6002 - acc: 0.5209 - ETA: 2s - loss: 7.5037 - acc: 0.5280 - ETA: 2s - loss: 7.3041 - acc: 0.5405 - ETA: 2s - loss: 7.2751 - acc: 0.5423 - ETA: 1s - loss: 7.3695 - acc: 0.5363 - ETA: 1s - loss: 7.4604 - acc: 0.5313 - ETA: 1s - loss: 7.4951 - acc: 0.5282 - ETA: 1s - loss: 7.5618 - acc: 0.5245 - ETA: 1s - loss: 7.5886 - acc: 0.5233 - ETA: 1s - loss: 7.6497 - acc: 0.5194 - ETA: 1s - loss: 7.6935 - acc: 0.5170 - ETA: 1s - loss: 7.7614 - acc: 0.5127 - ETA: 1s - loss: 7.7250 - acc: 0.5147 - ETA: 1s - loss: 7.7006 - acc: 0.5162 - ETA: 1s - loss: 7.6543 - acc: 0.5188 - ETA: 1s - loss: 7.7798 - acc: 0.5103 - ETA: 1s - loss: 7.7909 - acc: 0.5092 - ETA: 1s - loss: 7.7911 - acc: 0.5091 - ETA: 1s - loss: 7.7892 - acc: 0.5093 - ETA: 1s - loss: 7.8048 - acc: 0.5081 - ETA: 1s - loss: 7.8219 - acc: 0.5067 - ETA: 1s - loss: 7.7929 - acc: 0.5079 - ETA: 0s - loss: 7.7674 - acc: 0.5099 - ETA: 0s - loss: 7.7750 - acc: 0.5095 - ETA: 0s - loss: 7.7651 - acc: 0.5099 - ETA: 0s - loss: 7.7279 - acc: 0.5123 - ETA: 0s - loss: 7.7488 - acc: 0.5110 - ETA: 0s - loss: 7.7497 - acc: 0.5107 - ETA: 0s - loss: 7.7144 - acc: 0.5128 - ETA: 0s - loss: 7.6995 - acc: 0.5138 - ETA: 0s - loss: 7.6738 - acc: 0.5151 - ETA: 0s - loss: 7.6843 - acc: 0.5145 - ETA: 0s - loss: 7.6905 - acc: 0.5139 - ETA: 0s - loss: 7.6735 - acc: 0.5149 - ETA: 0s - loss: 7.6588 - acc: 0.5156 - ETA: 0s - loss: 7.6673 - acc: 0.5151 - ETA: 0s - loss: 7.6694 - acc: 0.5145 - ETA: 0s - loss: 7.6832 - acc: 0.5138 - ETA: 0s - loss: 7.6722 - acc: 0.5142 - ETA: 0s - loss: 7.6578 - acc: 0.5152Epoch 00018: val_loss improved from 8.49031 to 8.48890, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 7.6532 - acc: 0.5156 - val_loss: 8.4889 - val_acc: 0.3976
Epoch 20/20
6540/6680 [============================>.] - ETA: 2s - loss: 6.4489 - acc: 0.6000 - ETA: 2s - loss: 7.4562 - acc: 0.5375 - ETA: 2s - loss: 7.5421 - acc: 0.5200 - ETA: 2s - loss: 7.6598 - acc: 0.5136 - ETA: 2s - loss: 7.6195 - acc: 0.5172 - ETA: 2s - loss: 7.7067 - acc: 0.5125 - ETA: 2s - loss: 7.7083 - acc: 0.5140 - ETA: 2s - loss: 7.7258 - acc: 0.5140 - ETA: 2s - loss: 7.7440 - acc: 0.5132 - ETA: 2s - loss: 7.7342 - acc: 0.5138 - ETA: 1s - loss: 7.7372 - acc: 0.5118 - ETA: 1s - loss: 7.7496 - acc: 0.5101 - ETA: 1s - loss: 7.6309 - acc: 0.5178 - ETA: 1s - loss: 7.6224 - acc: 0.5186 - ETA: 1s - loss: 7.5942 - acc: 0.5206 - ETA: 1s - loss: 7.5223 - acc: 0.5248 - ETA: 1s - loss: 7.5631 - acc: 0.5220 - ETA: 1s - loss: 7.5518 - acc: 0.5224 - ETA: 1s - loss: 7.6049 - acc: 0.5188 - ETA: 1s - loss: 7.6051 - acc: 0.5190 - ETA: 1s - loss: 7.6916 - acc: 0.5132 - ETA: 1s - loss: 7.6823 - acc: 0.5139 - ETA: 1s - loss: 7.6992 - acc: 0.5133 - ETA: 1s - loss: 7.7152 - acc: 0.5124 - ETA: 1s - loss: 7.6553 - acc: 0.5160 - ETA: 1s - loss: 7.6809 - acc: 0.5145 - ETA: 1s - loss: 7.6881 - acc: 0.5140 - ETA: 1s - loss: 7.6978 - acc: 0.5137 - ETA: 1s - loss: 7.6589 - acc: 0.5163 - ETA: 0s - loss: 7.6681 - acc: 0.5155 - ETA: 0s - loss: 7.7023 - acc: 0.5131 - ETA: 0s - loss: 7.7043 - acc: 0.5127 - ETA: 0s - loss: 7.7117 - acc: 0.5125 - ETA: 0s - loss: 7.7022 - acc: 0.5130 - ETA: 0s - loss: 7.7292 - acc: 0.5116 - ETA: 0s - loss: 7.7053 - acc: 0.5131 - ETA: 0s - loss: 7.7101 - acc: 0.5129 - ETA: 0s - loss: 7.6846 - acc: 0.5146 - ETA: 0s - loss: 7.6743 - acc: 0.5151 - ETA: 0s - loss: 7.6384 - acc: 0.5173 - ETA: 0s - loss: 7.6435 - acc: 0.5169 - ETA: 0s - loss: 7.6423 - acc: 0.5169 - ETA: 0s - loss: 7.6275 - acc: 0.5178 - ETA: 0s - loss: 7.6067 - acc: 0.5191 - ETA: 0s - loss: 7.6042 - acc: 0.5188 - ETA: 0s - loss: 7.6157 - acc: 0.5174Epoch 00019: val_loss did not improve
6680/6680 [==============================] - 2s - loss: 7.6084 - acc: 0.5180 - val_loss: 8.4936 - val_acc: 0.4084
Out[77]:
<keras.callbacks.History at 0x1cea123eef0>

Load the Model with the Best Validation Loss


In [78]:
VGG16_model.load_weights('saved_models/weights.best.VGG16.hdf5')

Test the Model

Now, we can use the CNN to test how well it identifies breed within our test dataset of dog images. We print the test accuracy below.


In [79]:
# get index of predicted dog breed for each image in test set
VGG16_predictions = [np.argmax(VGG16_model.predict(np.expand_dims(feature, axis=0))) for feature in test_VGG16]

# report test accuracy
test_accuracy = 100*np.sum(np.array(VGG16_predictions)==np.argmax(test_targets, axis=1))/len(VGG16_predictions)
print('Test accuracy: %.4f%%' % test_accuracy)


Test accuracy: 40.5502%

Predict Dog Breed with the Model


In [80]:
from extract_bottleneck_features import *

def VGG16_predict_breed(img_path):
    # extract bottleneck features
    bottleneck_feature = extract_VGG16(path_to_tensor(img_path))
    # obtain predicted vector
    predicted_vector = VGG16_model.predict(bottleneck_feature)
    # return dog breed that is predicted by the model
    return dog_names[np.argmax(predicted_vector)]

Step 5: Create a CNN to Classify Dog Breeds (using Transfer Learning)

You will now use transfer learning to create a CNN that can identify dog breed from images. Your CNN must attain at least 60% accuracy on the test set.

In Step 4, we used transfer learning to create a CNN using VGG-16 bottleneck features. In this section, you must use the bottleneck features from a different pre-trained model. To make things easier for you, we have pre-computed the features for all of the networks that are currently available in Keras:

The files are encoded as such:

Dog{network}Data.npz

where {network}, in the above filename, can be one of VGG19, Resnet50, InceptionV3, or Xception. Pick one of the above architectures, download the corresponding bottleneck features, and store the downloaded file in the bottleneck_features/ folder in the repository.

(IMPLEMENTATION) Obtain Bottleneck Features

In the code block below, extract the bottleneck features corresponding to the train, test, and validation sets by running the following:

bottleneck_features = np.load('bottleneck_features/Dog{network}Data.npz')
train_{network} = bottleneck_features['train']
valid_{network} = bottleneck_features['valid']
test_{network} = bottleneck_features['test']

In [81]:
### TODO: Obtain bottleneck features from another pre-trained CNN.

bottleneck_features = np.load('bottleneck_features/DogVGG16Data.npz')
train_VGG16 = bottleneck_features['train']
valid_VGG16 = bottleneck_features['valid']
test_VGG16 = bottleneck_features['test']

(IMPLEMENTATION) Model Architecture

Create a CNN to classify dog breed. At the end of your code cell block, summarize the layers of your model by executing the line:

    <your model's name>.summary()

Question 5: Outline the steps you took to get to your final CNN architecture and your reasoning at each step. Describe why you think the architecture is suitable for the current problem.

Answer:


In [82]:
### TODO: Define your architecture.

VGG16_model = Sequential()
VGG16_model.add(GlobalAveragePooling2D(input_shape=train_VGG16.shape[1:]))
VGG16_model.add(Dense(133, activation='softmax'))

VGG16_model.summary()


_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
global_average_pooling2d_9 ( (None, 512)               0         
_________________________________________________________________
dense_11 (Dense)             (None, 133)               68229     
=================================================================
Total params: 68,229.0
Trainable params: 68,229.0
Non-trainable params: 0.0
_________________________________________________________________

(IMPLEMENTATION) Compile the Model


In [83]:
### TODO: Compile the model.
VGG16_model.compile(loss='categorical_crossentropy', optimizer='rmsprop', metrics=['accuracy'])

(IMPLEMENTATION) Train the Model

Train your model in the code cell below. Use model checkpointing to save the model that attains the best validation loss.

You are welcome to augment the training data, but this is not a requirement.


In [84]:
### TODO: Train the model.

checkpointer = ModelCheckpoint(filepath='saved_models/weights.best.VGG16.hdf5', 
                               verbose=1, save_best_only=True)

VGG16_model.fit(train_VGG16, train_targets, 
          validation_data=(valid_VGG16, valid_targets),
          epochs=20, batch_size=20, callbacks=[checkpointer], verbose=1)


Train on 6680 samples, validate on 835 samples
Epoch 1/20
6580/6680 [============================>.] - ETA: 235s - loss: 15.0093 - acc: 0.0000e+00 - ETA: 30s - loss: 15.0014 - acc: 0.0125      - ETA: 17s - loss: 15.2437 - acc: 0.0100 - ETA: 12s - loss: 14.9769 - acc: 0.0119 - ETA: 9s - loss: 14.8511 - acc: 0.0214  - ETA: 8s - loss: 14.7608 - acc: 0.0229 - ETA: 6s - loss: 14.6684 - acc: 0.0267 - ETA: 5s - loss: 14.5770 - acc: 0.0265 - ETA: 5s - loss: 14.6050 - acc: 0.0259 - ETA: 4s - loss: 14.5876 - acc: 0.0258 - ETA: 4s - loss: 14.5109 - acc: 0.0274 - ETA: 4s - loss: 14.4519 - acc: 0.0290 - ETA: 3s - loss: 14.3547 - acc: 0.0326 - ETA: 3s - loss: 14.2147 - acc: 0.0381 - ETA: 3s - loss: 14.1891 - acc: 0.0394 - ETA: 3s - loss: 14.1297 - acc: 0.0414 - ETA: 2s - loss: 14.0634 - acc: 0.0445 - ETA: 2s - loss: 14.0075 - acc: 0.0464 - ETA: 2s - loss: 13.9591 - acc: 0.0481 - ETA: 2s - loss: 13.9187 - acc: 0.0504 - ETA: 2s - loss: 13.8621 - acc: 0.0527 - ETA: 2s - loss: 13.8501 - acc: 0.0526 - ETA: 1s - loss: 13.8176 - acc: 0.0531 - ETA: 1s - loss: 13.7645 - acc: 0.0557 - ETA: 1s - loss: 13.6975 - acc: 0.0585 - ETA: 1s - loss: 13.6313 - acc: 0.0620 - ETA: 1s - loss: 13.5850 - acc: 0.0647 - ETA: 1s - loss: 13.5256 - acc: 0.0670 - ETA: 1s - loss: 13.5181 - acc: 0.0663 - ETA: 1s - loss: 13.4546 - acc: 0.0700 - ETA: 1s - loss: 13.4149 - acc: 0.0710 - ETA: 1s - loss: 13.3746 - acc: 0.0737 - ETA: 1s - loss: 13.3234 - acc: 0.0767 - ETA: 0s - loss: 13.2919 - acc: 0.0781 - ETA: 0s - loss: 13.2644 - acc: 0.0789 - ETA: 0s - loss: 13.2019 - acc: 0.0823 - ETA: 0s - loss: 13.1603 - acc: 0.0839 - ETA: 0s - loss: 13.1188 - acc: 0.0858 - ETA: 0s - loss: 13.0868 - acc: 0.0885 - ETA: 0s - loss: 13.0364 - acc: 0.0913 - ETA: 0s - loss: 13.0060 - acc: 0.0928 - ETA: 0s - loss: 12.9332 - acc: 0.0975 - ETA: 0s - loss: 12.9015 - acc: 0.0987 - ETA: 0s - loss: 12.8759 - acc: 0.1003 - ETA: 0s - loss: 12.8545 - acc: 0.1023 - ETA: 0s - loss: 12.8164 - acc: 0.1040Epoch 00000: val_loss improved from inf to 11.48737, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 3s - loss: 12.8042 - acc: 0.1049 - val_loss: 11.4874 - val_acc: 0.1856
Epoch 2/20
6580/6680 [============================>.] - ETA: 2s - loss: 10.8615 - acc: 0.3000 - ETA: 2s - loss: 11.3369 - acc: 0.2250 - ETA: 2s - loss: 11.2602 - acc: 0.2167 - ETA: 2s - loss: 11.4801 - acc: 0.2045 - ETA: 2s - loss: 11.5674 - acc: 0.1948 - ETA: 2s - loss: 11.4962 - acc: 0.2000 - ETA: 2s - loss: 11.4162 - acc: 0.2128 - ETA: 2s - loss: 11.3610 - acc: 0.2170 - ETA: 2s - loss: 11.4170 - acc: 0.2123 - ETA: 2s - loss: 11.4199 - acc: 0.2125 - ETA: 2s - loss: 11.4103 - acc: 0.2120 - ETA: 1s - loss: 11.3753 - acc: 0.2135 - ETA: 1s - loss: 11.3374 - acc: 0.2176 - ETA: 1s - loss: 11.3278 - acc: 0.2190 - ETA: 1s - loss: 11.2820 - acc: 0.2207 - ETA: 1s - loss: 11.3289 - acc: 0.2168 - ETA: 1s - loss: 11.2401 - acc: 0.2209 - ETA: 1s - loss: 11.2123 - acc: 0.2225 - ETA: 1s - loss: 11.1825 - acc: 0.2256 - ETA: 1s - loss: 11.1073 - acc: 0.2305 - ETA: 1s - loss: 11.0948 - acc: 0.2301 - ETA: 1s - loss: 11.1086 - acc: 0.2290 - ETA: 1s - loss: 11.0970 - acc: 0.2306 - ETA: 1s - loss: 11.0790 - acc: 0.2323 - ETA: 1s - loss: 11.1198 - acc: 0.2304 - ETA: 1s - loss: 11.0930 - acc: 0.2320 - ETA: 1s - loss: 11.0523 - acc: 0.2346 - ETA: 1s - loss: 11.0630 - acc: 0.2339 - ETA: 1s - loss: 11.0788 - acc: 0.2322 - ETA: 0s - loss: 11.0702 - acc: 0.2333 - ETA: 0s - loss: 11.0855 - acc: 0.2320 - ETA: 0s - loss: 11.1046 - acc: 0.2321 - ETA: 0s - loss: 11.1000 - acc: 0.2320 - ETA: 0s - loss: 11.0953 - acc: 0.2330 - ETA: 0s - loss: 11.0708 - acc: 0.2339 - ETA: 0s - loss: 11.0580 - acc: 0.2345 - ETA: 0s - loss: 11.0455 - acc: 0.2346 - ETA: 0s - loss: 11.0253 - acc: 0.2358 - ETA: 0s - loss: 10.9989 - acc: 0.2375 - ETA: 0s - loss: 11.0215 - acc: 0.2362 - ETA: 0s - loss: 10.9966 - acc: 0.2375 - ETA: 0s - loss: 10.9905 - acc: 0.2384 - ETA: 0s - loss: 10.9804 - acc: 0.2385 - ETA: 0s - loss: 10.9851 - acc: 0.2384 - ETA: 0s - loss: 10.9768 - acc: 0.2382 - ETA: 0s - loss: 10.9431 - acc: 0.2405 - ETA: 0s - loss: 10.9003 - acc: 0.2430Epoch 00001: val_loss improved from 11.48737 to 10.68637, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 10.8813 - acc: 0.2440 - val_loss: 10.6864 - val_acc: 0.2479
Epoch 3/20
6580/6680 [============================>.] - ETA: 2s - loss: 8.1104 - acc: 0.5000 - ETA: 2s - loss: 10.0482 - acc: 0.3188 - ETA: 2s - loss: 10.0539 - acc: 0.3233 - ETA: 2s - loss: 10.0548 - acc: 0.3295 - ETA: 2s - loss: 9.9673 - acc: 0.3345  - ETA: 2s - loss: 10.2469 - acc: 0.3111 - ETA: 2s - loss: 10.2707 - acc: 0.3081 - ETA: 2s - loss: 10.3322 - acc: 0.3020 - ETA: 2s - loss: 10.3942 - acc: 0.2982 - ETA: 2s - loss: 10.4007 - acc: 0.2992 - ETA: 1s - loss: 10.3107 - acc: 0.3070 - ETA: 1s - loss: 10.1909 - acc: 0.3128 - ETA: 1s - loss: 10.2067 - acc: 0.3112 - ETA: 1s - loss: 10.1727 - acc: 0.3109 - ETA: 1s - loss: 10.1947 - acc: 0.3096 - ETA: 1s - loss: 10.2330 - acc: 0.3075 - ETA: 1s - loss: 10.1841 - acc: 0.3084 - ETA: 1s - loss: 10.2305 - acc: 0.3038 - ETA: 1s - loss: 10.2005 - acc: 0.3051 - ETA: 1s - loss: 10.1773 - acc: 0.3075 - ETA: 1s - loss: 10.1513 - acc: 0.3085 - ETA: 1s - loss: 10.1696 - acc: 0.3071 - ETA: 1s - loss: 10.1725 - acc: 0.3081 - ETA: 1s - loss: 10.1676 - acc: 0.3086 - ETA: 1s - loss: 10.1712 - acc: 0.3079 - ETA: 1s - loss: 10.1704 - acc: 0.3076 - ETA: 1s - loss: 10.1806 - acc: 0.3068 - ETA: 1s - loss: 10.1741 - acc: 0.3063 - ETA: 1s - loss: 10.1702 - acc: 0.3061 - ETA: 0s - loss: 10.2024 - acc: 0.3041 - ETA: 0s - loss: 10.2084 - acc: 0.3035 - ETA: 0s - loss: 10.2154 - acc: 0.3036 - ETA: 0s - loss: 10.2087 - acc: 0.3041 - ETA: 0s - loss: 10.2092 - acc: 0.3040 - ETA: 0s - loss: 10.2380 - acc: 0.3020 - ETA: 0s - loss: 10.2445 - acc: 0.3024 - ETA: 0s - loss: 10.2597 - acc: 0.3014 - ETA: 0s - loss: 10.2668 - acc: 0.3008 - ETA: 0s - loss: 10.2222 - acc: 0.3022 - ETA: 0s - loss: 10.2166 - acc: 0.3030 - ETA: 0s - loss: 10.2265 - acc: 0.3021 - ETA: 0s - loss: 10.2641 - acc: 0.2995 - ETA: 0s - loss: 10.2538 - acc: 0.3008 - ETA: 0s - loss: 10.2683 - acc: 0.3003 - ETA: 0s - loss: 10.2660 - acc: 0.3008 - ETA: 0s - loss: 10.2486 - acc: 0.3020 - ETA: 0s - loss: 10.2577 - acc: 0.3018Epoch 00002: val_loss improved from 10.68637 to 10.41786, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 10.2483 - acc: 0.3019 - val_loss: 10.4179 - val_acc: 0.2814
Epoch 4/20
6660/6680 [============================>.] - ETA: 2s - loss: 11.6332 - acc: 0.2500 - ETA: 2s - loss: 10.6199 - acc: 0.2938 - ETA: 2s - loss: 10.6527 - acc: 0.2900 - ETA: 2s - loss: 10.2897 - acc: 0.3068 - ETA: 2s - loss: 10.2672 - acc: 0.3121 - ETA: 2s - loss: 10.4505 - acc: 0.3042 - ETA: 2s - loss: 10.3564 - acc: 0.3105 - ETA: 2s - loss: 10.3720 - acc: 0.3082 - ETA: 2s - loss: 10.2698 - acc: 0.3152 - ETA: 2s - loss: 10.2820 - acc: 0.3135 - ETA: 2s - loss: 10.3074 - acc: 0.3123 - ETA: 2s - loss: 10.2415 - acc: 0.3171 - ETA: 1s - loss: 10.3132 - acc: 0.3127 - ETA: 1s - loss: 10.3161 - acc: 0.3115 - ETA: 1s - loss: 10.2481 - acc: 0.3158 - ETA: 1s - loss: 10.2136 - acc: 0.3200 - ETA: 1s - loss: 10.2210 - acc: 0.3196 - ETA: 1s - loss: 10.2072 - acc: 0.3192 - ETA: 1s - loss: 10.1427 - acc: 0.3242 - ETA: 1s - loss: 10.0921 - acc: 0.3272 - ETA: 1s - loss: 10.1096 - acc: 0.3269 - ETA: 1s - loss: 10.1128 - acc: 0.3272 - ETA: 1s - loss: 10.1126 - acc: 0.3274 - ETA: 1s - loss: 10.1218 - acc: 0.3251 - ETA: 1s - loss: 10.1582 - acc: 0.3239 - ETA: 1s - loss: 10.1114 - acc: 0.3268 - ETA: 1s - loss: 10.1126 - acc: 0.3261 - ETA: 1s - loss: 10.0759 - acc: 0.3283 - ETA: 0s - loss: 10.0307 - acc: 0.3314 - ETA: 0s - loss: 10.0039 - acc: 0.3323 - ETA: 0s - loss: 9.9812 - acc: 0.3334  - ETA: 0s - loss: 10.0122 - acc: 0.3318 - ETA: 0s - loss: 10.0455 - acc: 0.3300 - ETA: 0s - loss: 10.0475 - acc: 0.3307 - ETA: 0s - loss: 10.0494 - acc: 0.3312 - ETA: 0s - loss: 10.0579 - acc: 0.3304 - ETA: 0s - loss: 10.0495 - acc: 0.3311 - ETA: 0s - loss: 10.0147 - acc: 0.3328 - ETA: 0s - loss: 9.9925 - acc: 0.3338  - ETA: 0s - loss: 9.9769 - acc: 0.3343 - ETA: 0s - loss: 9.9780 - acc: 0.3340 - ETA: 0s - loss: 9.9863 - acc: 0.3337 - ETA: 0s - loss: 9.9753 - acc: 0.3345 - ETA: 0s - loss: 9.9710 - acc: 0.3345 - ETA: 0s - loss: 9.9653 - acc: 0.3345 - ETA: 0s - loss: 9.9474 - acc: 0.3357Epoch 00003: val_loss improved from 10.41786 to 10.15631, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 9.9514 - acc: 0.3356 - val_loss: 10.1563 - val_acc: 0.3006
Epoch 5/20
6580/6680 [============================>.] - ETA: 2s - loss: 6.5733 - acc: 0.5500 - ETA: 2s - loss: 9.7703 - acc: 0.3438 - ETA: 2s - loss: 9.7364 - acc: 0.3500 - ETA: 2s - loss: 9.7147 - acc: 0.3568 - ETA: 2s - loss: 9.7453 - acc: 0.3586 - ETA: 2s - loss: 9.5743 - acc: 0.3635 - ETA: 2s - loss: 9.5795 - acc: 0.3648 - ETA: 2s - loss: 9.6324 - acc: 0.3618 - ETA: 2s - loss: 9.6515 - acc: 0.3612 - ETA: 2s - loss: 9.6025 - acc: 0.3623 - ETA: 1s - loss: 9.5941 - acc: 0.3604 - ETA: 1s - loss: 9.6508 - acc: 0.3576 - ETA: 1s - loss: 9.7458 - acc: 0.3500 - ETA: 1s - loss: 9.7740 - acc: 0.3468 - ETA: 1s - loss: 9.8057 - acc: 0.3465 - ETA: 1s - loss: 9.7800 - acc: 0.3495 - ETA: 1s - loss: 9.7853 - acc: 0.3500 - ETA: 1s - loss: 9.7612 - acc: 0.3512 - ETA: 1s - loss: 9.7289 - acc: 0.3539 - ETA: 1s - loss: 9.7360 - acc: 0.3526 - ETA: 1s - loss: 9.7372 - acc: 0.3514 - ETA: 1s - loss: 9.7007 - acc: 0.3530 - ETA: 1s - loss: 9.7098 - acc: 0.3532 - ETA: 1s - loss: 9.7083 - acc: 0.3534 - ETA: 1s - loss: 9.7237 - acc: 0.3521 - ETA: 1s - loss: 9.7327 - acc: 0.3520 - ETA: 1s - loss: 9.7416 - acc: 0.3519 - ETA: 1s - loss: 9.7346 - acc: 0.3524 - ETA: 1s - loss: 9.7481 - acc: 0.3518 - ETA: 0s - loss: 9.7181 - acc: 0.3532 - ETA: 0s - loss: 9.6875 - acc: 0.3547 - ETA: 0s - loss: 9.6804 - acc: 0.3543 - ETA: 0s - loss: 9.6617 - acc: 0.3553 - ETA: 0s - loss: 9.6242 - acc: 0.3575 - ETA: 0s - loss: 9.6762 - acc: 0.3546 - ETA: 0s - loss: 9.6750 - acc: 0.3543 - ETA: 0s - loss: 9.6901 - acc: 0.3539 - ETA: 0s - loss: 9.6870 - acc: 0.3544 - ETA: 0s - loss: 9.6674 - acc: 0.3567 - ETA: 0s - loss: 9.6459 - acc: 0.3578 - ETA: 0s - loss: 9.6820 - acc: 0.3558 - ETA: 0s - loss: 9.6913 - acc: 0.3550 - ETA: 0s - loss: 9.6930 - acc: 0.3547 - ETA: 0s - loss: 9.7223 - acc: 0.3528 - ETA: 0s - loss: 9.7203 - acc: 0.3532 - ETA: 0s - loss: 9.7274 - acc: 0.3530 - ETA: 0s - loss: 9.7152 - acc: 0.3524Epoch 00004: val_loss improved from 10.15631 to 10.04974, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 9.7149 - acc: 0.3525 - val_loss: 10.0497 - val_acc: 0.3042
Epoch 6/20
6600/6680 [============================>.] - ETA: 2s - loss: 8.9047 - acc: 0.3500 - ETA: 2s - loss: 9.8861 - acc: 0.3375 - ETA: 2s - loss: 10.0908 - acc: 0.3300 - ETA: 2s - loss: 10.1215 - acc: 0.3318 - ETA: 2s - loss: 9.8690 - acc: 0.3379  - ETA: 2s - loss: 9.6320 - acc: 0.3542 - ETA: 2s - loss: 9.6498 - acc: 0.3570 - ETA: 2s - loss: 9.5639 - acc: 0.3620 - ETA: 2s - loss: 9.6588 - acc: 0.3579 - ETA: 2s - loss: 9.7081 - acc: 0.3555 - ETA: 1s - loss: 9.7598 - acc: 0.3535 - ETA: 1s - loss: 9.6482 - acc: 0.3577 - ETA: 1s - loss: 9.6244 - acc: 0.3594 - ETA: 1s - loss: 9.5560 - acc: 0.3661 - ETA: 1s - loss: 9.5267 - acc: 0.3695 - ETA: 1s - loss: 9.5043 - acc: 0.3724 - ETA: 1s - loss: 9.4937 - acc: 0.3743 - ETA: 1s - loss: 9.4879 - acc: 0.3762 - ETA: 1s - loss: 9.4996 - acc: 0.3742 - ETA: 1s - loss: 9.4872 - acc: 0.3752 - ETA: 1s - loss: 9.5256 - acc: 0.3726 - ETA: 1s - loss: 9.4833 - acc: 0.3760 - ETA: 1s - loss: 9.4835 - acc: 0.3745 - ETA: 1s - loss: 9.5171 - acc: 0.3723 - ETA: 1s - loss: 9.5404 - acc: 0.3717 - ETA: 1s - loss: 9.5570 - acc: 0.3714 - ETA: 1s - loss: 9.5677 - acc: 0.3709 - ETA: 1s - loss: 9.6154 - acc: 0.3686 - ETA: 0s - loss: 9.6165 - acc: 0.3679 - ETA: 0s - loss: 9.5984 - acc: 0.3685 - ETA: 0s - loss: 9.5504 - acc: 0.3723 - ETA: 0s - loss: 9.5384 - acc: 0.3731 - ETA: 0s - loss: 9.5298 - acc: 0.3736 - ETA: 0s - loss: 9.5429 - acc: 0.3733 - ETA: 0s - loss: 9.5173 - acc: 0.3747 - ETA: 0s - loss: 9.5213 - acc: 0.3746 - ETA: 0s - loss: 9.5365 - acc: 0.3737 - ETA: 0s - loss: 9.5172 - acc: 0.3750 - ETA: 0s - loss: 9.5165 - acc: 0.3751 - ETA: 0s - loss: 9.5299 - acc: 0.3738 - ETA: 0s - loss: 9.5013 - acc: 0.3756 - ETA: 0s - loss: 9.5158 - acc: 0.3750 - ETA: 0s - loss: 9.5060 - acc: 0.3757 - ETA: 0s - loss: 9.5300 - acc: 0.3745 - ETA: 0s - loss: 9.5447 - acc: 0.3740 - ETA: 0s - loss: 9.5610 - acc: 0.3728 - ETA: 0s - loss: 9.5546 - acc: 0.3729Epoch 00005: val_loss improved from 10.04974 to 9.89959, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 9.5628 - acc: 0.3723 - val_loss: 9.8996 - val_acc: 0.3257
Epoch 7/20
6560/6680 [============================>.] - ETA: 2s - loss: 9.6757 - acc: 0.4000 - ETA: 2s - loss: 8.7705 - acc: 0.4313 - ETA: 2s - loss: 8.9609 - acc: 0.4200 - ETA: 2s - loss: 9.1103 - acc: 0.4136 - ETA: 2s - loss: 9.2534 - acc: 0.4034 - ETA: 2s - loss: 9.3294 - acc: 0.3972 - ETA: 2s - loss: 9.3554 - acc: 0.3940 - ETA: 2s - loss: 9.5232 - acc: 0.3857 - ETA: 2s - loss: 9.6162 - acc: 0.3804 - ETA: 2s - loss: 9.6560 - acc: 0.3794 - ETA: 2s - loss: 9.6523 - acc: 0.3800 - ETA: 2s - loss: 9.6244 - acc: 0.3812 - ETA: 1s - loss: 9.7028 - acc: 0.3768 - ETA: 1s - loss: 9.7023 - acc: 0.3764 - ETA: 1s - loss: 9.6933 - acc: 0.3765 - ETA: 1s - loss: 9.7387 - acc: 0.3748 - ETA: 1s - loss: 9.7206 - acc: 0.3741 - ETA: 1s - loss: 9.7441 - acc: 0.3725 - ETA: 1s - loss: 9.7258 - acc: 0.3728 - ETA: 1s - loss: 9.7186 - acc: 0.3722 - ETA: 1s - loss: 9.6486 - acc: 0.3766 - ETA: 1s - loss: 9.6340 - acc: 0.3780 - ETA: 1s - loss: 9.5487 - acc: 0.3835 - ETA: 1s - loss: 9.5720 - acc: 0.3815 - ETA: 1s - loss: 9.5001 - acc: 0.3861 - ETA: 1s - loss: 9.5238 - acc: 0.3847 - ETA: 1s - loss: 9.4988 - acc: 0.3858 - ETA: 1s - loss: 9.5051 - acc: 0.3858 - ETA: 1s - loss: 9.5113 - acc: 0.3848 - ETA: 1s - loss: 9.5224 - acc: 0.3841 - ETA: 0s - loss: 9.5107 - acc: 0.3851 - ETA: 0s - loss: 9.5240 - acc: 0.3849 - ETA: 0s - loss: 9.4941 - acc: 0.3869 - ETA: 0s - loss: 9.4946 - acc: 0.3871 - ETA: 0s - loss: 9.4641 - acc: 0.3885 - ETA: 0s - loss: 9.4784 - acc: 0.3878 - ETA: 0s - loss: 9.4588 - acc: 0.3881 - ETA: 0s - loss: 9.4790 - acc: 0.3867 - ETA: 0s - loss: 9.4813 - acc: 0.3861 - ETA: 0s - loss: 9.4762 - acc: 0.3867 - ETA: 0s - loss: 9.4691 - acc: 0.3876 - ETA: 0s - loss: 9.4652 - acc: 0.3879 - ETA: 0s - loss: 9.4843 - acc: 0.3868 - ETA: 0s - loss: 9.4848 - acc: 0.3868 - ETA: 0s - loss: 9.4784 - acc: 0.3874 - ETA: 0s - loss: 9.4844 - acc: 0.3867 - ETA: 0s - loss: 9.5004 - acc: 0.3862 - ETA: 0s - loss: 9.4915 - acc: 0.3855Epoch 00006: val_loss improved from 9.89959 to 9.71969, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 9.4663 - acc: 0.3868 - val_loss: 9.7197 - val_acc: 0.3257
Epoch 8/20
6560/6680 [============================>.] - ETA: 3s - loss: 9.7512 - acc: 0.3500 - ETA: 2s - loss: 9.5205 - acc: 0.3786 - ETA: 2s - loss: 9.3877 - acc: 0.3923 - ETA: 2s - loss: 9.1527 - acc: 0.4100 - ETA: 2s - loss: 8.9451 - acc: 0.4241 - ETA: 2s - loss: 9.1386 - acc: 0.4136 - ETA: 2s - loss: 9.0216 - acc: 0.4200 - ETA: 2s - loss: 9.1741 - acc: 0.4085 - ETA: 2s - loss: 9.1811 - acc: 0.4075 - ETA: 2s - loss: 9.1584 - acc: 0.4092 - ETA: 2s - loss: 9.1096 - acc: 0.4119 - ETA: 2s - loss: 9.0868 - acc: 0.4155 - ETA: 1s - loss: 9.0867 - acc: 0.4167 - ETA: 1s - loss: 9.1170 - acc: 0.4144 - ETA: 1s - loss: 9.1616 - acc: 0.4129 - ETA: 1s - loss: 9.1447 - acc: 0.4140 - ETA: 1s - loss: 9.2027 - acc: 0.4111 - ETA: 1s - loss: 9.2583 - acc: 0.4078 - ETA: 1s - loss: 9.2945 - acc: 0.4048 - ETA: 1s - loss: 9.2699 - acc: 0.4061 - ETA: 1s - loss: 9.2988 - acc: 0.4047 - ETA: 1s - loss: 9.2923 - acc: 0.4052 - ETA: 1s - loss: 9.3065 - acc: 0.4046 - ETA: 1s - loss: 9.3046 - acc: 0.4053 - ETA: 1s - loss: 9.3210 - acc: 0.4033 - ETA: 1s - loss: 9.2866 - acc: 0.4043 - ETA: 1s - loss: 9.3036 - acc: 0.4036 - ETA: 1s - loss: 9.2656 - acc: 0.4056 - ETA: 1s - loss: 9.2564 - acc: 0.4056 - ETA: 0s - loss: 9.2695 - acc: 0.4054 - ETA: 0s - loss: 9.2750 - acc: 0.4048 - ETA: 0s - loss: 9.2474 - acc: 0.4057 - ETA: 0s - loss: 9.2416 - acc: 0.4060 - ETA: 0s - loss: 9.2526 - acc: 0.4054 - ETA: 0s - loss: 9.2137 - acc: 0.4073 - ETA: 0s - loss: 9.2436 - acc: 0.4055 - ETA: 0s - loss: 9.2571 - acc: 0.4049 - ETA: 0s - loss: 9.2617 - acc: 0.4046 - ETA: 0s - loss: 9.2898 - acc: 0.4030 - ETA: 0s - loss: 9.2835 - acc: 0.4035 - ETA: 0s - loss: 9.2914 - acc: 0.4028 - ETA: 0s - loss: 9.2966 - acc: 0.4028 - ETA: 0s - loss: 9.3071 - acc: 0.4014 - ETA: 0s - loss: 9.3174 - acc: 0.4008 - ETA: 0s - loss: 9.3226 - acc: 0.4002 - ETA: 0s - loss: 9.3067 - acc: 0.4014 - ETA: 0s - loss: 9.3342 - acc: 0.3998 - ETA: 0s - loss: 9.3406 - acc: 0.3998Epoch 00007: val_loss did not improve
6680/6680 [==============================] - 2s - loss: 9.3399 - acc: 0.4001 - val_loss: 9.7459 - val_acc: 0.3377
Epoch 9/20
6560/6680 [============================>.] - ETA: 2s - loss: 9.6710 - acc: 0.4000 - ETA: 2s - loss: 9.5838 - acc: 0.4000 - ETA: 2s - loss: 8.9893 - acc: 0.4367 - ETA: 2s - loss: 9.4032 - acc: 0.4091 - ETA: 2s - loss: 9.2497 - acc: 0.4190 - ETA: 2s - loss: 9.3546 - acc: 0.4129 - ETA: 2s - loss: 9.3659 - acc: 0.4119 - ETA: 2s - loss: 9.3856 - acc: 0.4112 - ETA: 2s - loss: 9.2539 - acc: 0.4188 - ETA: 2s - loss: 9.1753 - acc: 0.4214 - ETA: 2s - loss: 9.1953 - acc: 0.4207 - ETA: 1s - loss: 9.1832 - acc: 0.4221 - ETA: 1s - loss: 9.0786 - acc: 0.4268 - ETA: 1s - loss: 9.0996 - acc: 0.4253 - ETA: 1s - loss: 9.1567 - acc: 0.4204 - ETA: 1s - loss: 9.1514 - acc: 0.4195 - ETA: 1s - loss: 9.1943 - acc: 0.4174 - ETA: 1s - loss: 9.2375 - acc: 0.4144 - ETA: 1s - loss: 9.3042 - acc: 0.4089 - ETA: 1s - loss: 9.3113 - acc: 0.4077 - ETA: 1s - loss: 9.2886 - acc: 0.4088 - ETA: 1s - loss: 9.2913 - acc: 0.4087 - ETA: 1s - loss: 9.2962 - acc: 0.4079 - ETA: 1s - loss: 9.3212 - acc: 0.4063 - ETA: 1s - loss: 9.3380 - acc: 0.4042 - ETA: 1s - loss: 9.3217 - acc: 0.4046 - ETA: 1s - loss: 9.3508 - acc: 0.4022 - ETA: 1s - loss: 9.4021 - acc: 0.3992 - ETA: 1s - loss: 9.3502 - acc: 0.4028 - ETA: 0s - loss: 9.3105 - acc: 0.4049 - ETA: 0s - loss: 9.2973 - acc: 0.4057 - ETA: 0s - loss: 9.3207 - acc: 0.4037 - ETA: 0s - loss: 9.2955 - acc: 0.4049 - ETA: 0s - loss: 9.2920 - acc: 0.4050 - ETA: 0s - loss: 9.2864 - acc: 0.4053 - ETA: 0s - loss: 9.2524 - acc: 0.4073 - ETA: 0s - loss: 9.2428 - acc: 0.4081 - ETA: 0s - loss: 9.2400 - acc: 0.4079 - ETA: 0s - loss: 9.2641 - acc: 0.4064 - ETA: 0s - loss: 9.2675 - acc: 0.4064 - ETA: 0s - loss: 9.2745 - acc: 0.4059 - ETA: 0s - loss: 9.2706 - acc: 0.4064 - ETA: 0s - loss: 9.2563 - acc: 0.4075 - ETA: 0s - loss: 9.2563 - acc: 0.4071 - ETA: 0s - loss: 9.2535 - acc: 0.4071 - ETA: 0s - loss: 9.2565 - acc: 0.4073 - ETA: 0s - loss: 9.2507 - acc: 0.4072 - ETA: 0s - loss: 9.2635 - acc: 0.4063Epoch 00008: val_loss improved from 9.71969 to 9.70541, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 9.2622 - acc: 0.4063 - val_loss: 9.7054 - val_acc: 0.3413
Epoch 10/20
6620/6680 [============================>.] - ETA: 2s - loss: 8.0777 - acc: 0.5000 - ETA: 2s - loss: 9.8634 - acc: 0.3625 - ETA: 2s - loss: 9.5106 - acc: 0.3929 - ETA: 2s - loss: 9.3103 - acc: 0.4079 - ETA: 2s - loss: 9.1210 - acc: 0.4200 - ETA: 2s - loss: 9.0972 - acc: 0.4219 - ETA: 2s - loss: 9.2571 - acc: 0.4128 - ETA: 2s - loss: 9.1144 - acc: 0.4217 - ETA: 2s - loss: 9.0792 - acc: 0.4240 - ETA: 2s - loss: 9.1452 - acc: 0.4195 - ETA: 2s - loss: 9.1402 - acc: 0.4182 - ETA: 2s - loss: 9.2112 - acc: 0.4137 - ETA: 2s - loss: 9.1413 - acc: 0.4179 - ETA: 1s - loss: 9.1836 - acc: 0.4165 - ETA: 1s - loss: 9.2282 - acc: 0.4130 - ETA: 1s - loss: 9.2144 - acc: 0.4139 - ETA: 1s - loss: 9.1141 - acc: 0.4201 - ETA: 1s - loss: 9.0536 - acc: 0.4237 - ETA: 1s - loss: 9.0938 - acc: 0.4215 - ETA: 1s - loss: 9.0809 - acc: 0.4228 - ETA: 1s - loss: 9.0071 - acc: 0.4260 - ETA: 1s - loss: 9.0240 - acc: 0.4245 - ETA: 1s - loss: 9.0284 - acc: 0.4244 - ETA: 1s - loss: 9.0595 - acc: 0.4227 - ETA: 1s - loss: 9.0603 - acc: 0.4224 - ETA: 1s - loss: 9.0712 - acc: 0.4218 - ETA: 1s - loss: 9.1076 - acc: 0.4183 - ETA: 1s - loss: 9.1109 - acc: 0.4176 - ETA: 1s - loss: 9.0887 - acc: 0.4190 - ETA: 0s - loss: 9.1023 - acc: 0.4179 - ETA: 0s - loss: 9.1079 - acc: 0.4173 - ETA: 0s - loss: 9.0920 - acc: 0.4183 - ETA: 0s - loss: 9.1074 - acc: 0.4171 - ETA: 0s - loss: 9.1122 - acc: 0.4168 - ETA: 0s - loss: 9.1114 - acc: 0.4171 - ETA: 0s - loss: 9.1238 - acc: 0.4162 - ETA: 0s - loss: 9.1482 - acc: 0.4140 - ETA: 0s - loss: 9.1327 - acc: 0.4150 - ETA: 0s - loss: 9.1183 - acc: 0.4161 - ETA: 0s - loss: 9.1217 - acc: 0.4154 - ETA: 0s - loss: 9.1143 - acc: 0.4154 - ETA: 0s - loss: 9.0927 - acc: 0.4159 - ETA: 0s - loss: 9.0961 - acc: 0.4157 - ETA: 0s - loss: 9.1118 - acc: 0.4145 - ETA: 0s - loss: 9.1046 - acc: 0.4148 - ETA: 0s - loss: 9.1101 - acc: 0.4146 - ETA: 0s - loss: 9.1013 - acc: 0.4152 - ETA: 0s - loss: 9.1176 - acc: 0.4145Epoch 00009: val_loss improved from 9.70541 to 9.57599, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 9.1299 - acc: 0.4139 - val_loss: 9.5760 - val_acc: 0.3473
Epoch 11/20
6640/6680 [============================>.] - ETA: 2s - loss: 10.4862 - acc: 0.3500 - ETA: 2s - loss: 9.9642 - acc: 0.3722  - ETA: 2s - loss: 9.9844 - acc: 0.3676 - ETA: 2s - loss: 9.7426 - acc: 0.3800 - ETA: 2s - loss: 9.5660 - acc: 0.3924 - ETA: 2s - loss: 9.4958 - acc: 0.3963 - ETA: 1s - loss: 9.4317 - acc: 0.4000 - ETA: 1s - loss: 9.5516 - acc: 0.3947 - ETA: 1s - loss: 9.4465 - acc: 0.4016 - ETA: 1s - loss: 9.4030 - acc: 0.4021 - ETA: 1s - loss: 9.3426 - acc: 0.4032 - ETA: 1s - loss: 9.3195 - acc: 0.4052 - ETA: 1s - loss: 9.3094 - acc: 0.4059 - ETA: 1s - loss: 9.2772 - acc: 0.4088 - ETA: 1s - loss: 9.2268 - acc: 0.4118 - ETA: 1s - loss: 9.2274 - acc: 0.4124 - ETA: 1s - loss: 9.2024 - acc: 0.4133 - ETA: 1s - loss: 9.1925 - acc: 0.4136 - ETA: 1s - loss: 9.1817 - acc: 0.4143 - ETA: 1s - loss: 9.1883 - acc: 0.4129 - ETA: 1s - loss: 9.2158 - acc: 0.4114 - ETA: 1s - loss: 9.1822 - acc: 0.4137 - ETA: 1s - loss: 9.2129 - acc: 0.4125 - ETA: 1s - loss: 9.2754 - acc: 0.4091 - ETA: 1s - loss: 9.2698 - acc: 0.4096 - ETA: 1s - loss: 9.2686 - acc: 0.4097 - ETA: 0s - loss: 9.2956 - acc: 0.4079 - ETA: 0s - loss: 9.2348 - acc: 0.4110 - ETA: 0s - loss: 9.2239 - acc: 0.4120 - ETA: 0s - loss: 9.2197 - acc: 0.4120 - ETA: 0s - loss: 9.2017 - acc: 0.4136 - ETA: 0s - loss: 9.1737 - acc: 0.4153 - ETA: 0s - loss: 9.1875 - acc: 0.4148 - ETA: 0s - loss: 9.1263 - acc: 0.4181 - ETA: 0s - loss: 9.1221 - acc: 0.4179 - ETA: 0s - loss: 9.1153 - acc: 0.4182 - ETA: 0s - loss: 9.1013 - acc: 0.4190 - ETA: 0s - loss: 9.1086 - acc: 0.4187 - ETA: 0s - loss: 9.0953 - acc: 0.4192 - ETA: 0s - loss: 9.0941 - acc: 0.4194 - ETA: 0s - loss: 9.0956 - acc: 0.4193 - ETA: 0s - loss: 9.0835 - acc: 0.4202 - ETA: 0s - loss: 9.0539 - acc: 0.4221 - ETA: 0s - loss: 9.0255 - acc: 0.4240 - ETA: 0s - loss: 9.0283 - acc: 0.4238Epoch 00010: val_loss improved from 9.57599 to 9.57566, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 9.0254 - acc: 0.4240 - val_loss: 9.5757 - val_acc: 0.3509
Epoch 12/20
6600/6680 [============================>.] - ETA: 2s - loss: 7.5226 - acc: 0.5000 - ETA: 2s - loss: 8.7100 - acc: 0.4375 - ETA: 2s - loss: 8.4956 - acc: 0.4562 - ETA: 2s - loss: 8.4143 - acc: 0.4625 - ETA: 2s - loss: 8.7553 - acc: 0.4453 - ETA: 1s - loss: 8.7256 - acc: 0.4450 - ETA: 1s - loss: 8.8015 - acc: 0.4417 - ETA: 1s - loss: 8.6488 - acc: 0.4509 - ETA: 1s - loss: 8.6641 - acc: 0.4516 - ETA: 1s - loss: 8.6761 - acc: 0.4507 - ETA: 1s - loss: 8.6740 - acc: 0.4500 - ETA: 1s - loss: 8.6729 - acc: 0.4506 - ETA: 1s - loss: 8.6716 - acc: 0.4511 - ETA: 1s - loss: 8.5947 - acc: 0.4555 - ETA: 1s - loss: 8.6207 - acc: 0.4542 - ETA: 1s - loss: 8.6739 - acc: 0.4491 - ETA: 1s - loss: 8.6000 - acc: 0.4521 - ETA: 1s - loss: 8.6282 - acc: 0.4508 - ETA: 1s - loss: 8.6472 - acc: 0.4500 - ETA: 1s - loss: 8.7163 - acc: 0.4458 - ETA: 1s - loss: 8.7551 - acc: 0.4439 - ETA: 1s - loss: 8.7727 - acc: 0.4426 - ETA: 1s - loss: 8.7591 - acc: 0.4432 - ETA: 1s - loss: 8.7715 - acc: 0.4426 - ETA: 1s - loss: 8.7894 - acc: 0.4418 - ETA: 1s - loss: 8.8335 - acc: 0.4393 - ETA: 1s - loss: 8.8397 - acc: 0.4392 - ETA: 1s - loss: 8.8346 - acc: 0.4396 - ETA: 0s - loss: 8.8471 - acc: 0.4385 - ETA: 0s - loss: 8.8845 - acc: 0.4360 - ETA: 0s - loss: 8.8610 - acc: 0.4369 - ETA: 0s - loss: 8.8872 - acc: 0.4351 - ETA: 0s - loss: 8.8974 - acc: 0.4345 - ETA: 0s - loss: 8.9174 - acc: 0.4335 - ETA: 0s - loss: 8.9410 - acc: 0.4321 - ETA: 0s - loss: 8.9497 - acc: 0.4314 - ETA: 0s - loss: 8.9484 - acc: 0.4313 - ETA: 0s - loss: 8.9827 - acc: 0.4294 - ETA: 0s - loss: 8.9930 - acc: 0.4286 - ETA: 0s - loss: 8.9573 - acc: 0.4310 - ETA: 0s - loss: 8.9441 - acc: 0.4319 - ETA: 0s - loss: 8.9500 - acc: 0.4317 - ETA: 0s - loss: 8.9614 - acc: 0.4313 - ETA: 0s - loss: 8.9472 - acc: 0.4322 - ETA: 0s - loss: 8.9700 - acc: 0.4309 - ETA: 0s - loss: 8.9513 - acc: 0.4322 - ETA: 0s - loss: 8.9577 - acc: 0.4320Epoch 00011: val_loss improved from 9.57566 to 9.48971, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 8.9606 - acc: 0.4314 - val_loss: 9.4897 - val_acc: 0.3449
Epoch 13/20
6640/6680 [============================>.] - ETA: 2s - loss: 6.4582 - acc: 0.6000 - ETA: 2s - loss: 8.5076 - acc: 0.4500 - ETA: 2s - loss: 8.3844 - acc: 0.4643 - ETA: 2s - loss: 8.4873 - acc: 0.4571 - ETA: 2s - loss: 8.5662 - acc: 0.4536 - ETA: 2s - loss: 8.8102 - acc: 0.4414 - ETA: 2s - loss: 9.1370 - acc: 0.4202 - ETA: 2s - loss: 9.1386 - acc: 0.4204 - ETA: 2s - loss: 9.2051 - acc: 0.4152 - ETA: 2s - loss: 9.1145 - acc: 0.4190 - ETA: 2s - loss: 9.0445 - acc: 0.4250 - ETA: 2s - loss: 9.0113 - acc: 0.4273 - ETA: 1s - loss: 8.9751 - acc: 0.4286 - ETA: 1s - loss: 9.0064 - acc: 0.4269 - ETA: 1s - loss: 8.9889 - acc: 0.4288 - ETA: 1s - loss: 8.9414 - acc: 0.4316 - ETA: 1s - loss: 8.9590 - acc: 0.4310 - ETA: 1s - loss: 9.0311 - acc: 0.4271 - ETA: 1s - loss: 8.9765 - acc: 0.4303 - ETA: 1s - loss: 8.9341 - acc: 0.4336 - ETA: 1s - loss: 8.9252 - acc: 0.4348 - ETA: 1s - loss: 8.8961 - acc: 0.4358 - ETA: 1s - loss: 8.9062 - acc: 0.4355 - ETA: 1s - loss: 8.9105 - acc: 0.4355 - ETA: 1s - loss: 8.9092 - acc: 0.4352 - ETA: 1s - loss: 8.9192 - acc: 0.4347 - ETA: 1s - loss: 8.9044 - acc: 0.4358 - ETA: 1s - loss: 8.8656 - acc: 0.4382 - ETA: 1s - loss: 8.8593 - acc: 0.4386 - ETA: 1s - loss: 8.8836 - acc: 0.4373 - ETA: 0s - loss: 8.8768 - acc: 0.4374 - ETA: 0s - loss: 8.8835 - acc: 0.4372 - ETA: 0s - loss: 8.8602 - acc: 0.4384 - ETA: 0s - loss: 8.8557 - acc: 0.4377 - ETA: 0s - loss: 8.8393 - acc: 0.4391 - ETA: 0s - loss: 8.8475 - acc: 0.4386 - ETA: 0s - loss: 8.8623 - acc: 0.4377 - ETA: 0s - loss: 8.8537 - acc: 0.4383 - ETA: 0s - loss: 8.8461 - acc: 0.4386 - ETA: 0s - loss: 8.8273 - acc: 0.4396 - ETA: 0s - loss: 8.8388 - acc: 0.4388 - ETA: 0s - loss: 8.8712 - acc: 0.4367 - ETA: 0s - loss: 8.8708 - acc: 0.4361 - ETA: 0s - loss: 8.8860 - acc: 0.4348 - ETA: 0s - loss: 8.8740 - acc: 0.4352 - ETA: 0s - loss: 8.8750 - acc: 0.4354 - ETA: 0s - loss: 8.8931 - acc: 0.4345 - ETA: 0s - loss: 8.9168 - acc: 0.4333Epoch 00012: val_loss improved from 9.48971 to 9.33635, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 8.9166 - acc: 0.4334 - val_loss: 9.3363 - val_acc: 0.3629
Epoch 14/20
6640/6680 [============================>.] - ETA: 3s - loss: 9.6747 - acc: 0.4000 - ETA: 2s - loss: 9.7969 - acc: 0.3857 - ETA: 2s - loss: 9.1329 - acc: 0.4214 - ETA: 2s - loss: 8.8550 - acc: 0.4400 - ETA: 2s - loss: 8.7155 - acc: 0.4500 - ETA: 2s - loss: 8.4871 - acc: 0.4606 - ETA: 2s - loss: 8.5010 - acc: 0.4577 - ETA: 2s - loss: 8.5178 - acc: 0.4578 - ETA: 2s - loss: 8.4956 - acc: 0.4608 - ETA: 2s - loss: 8.5653 - acc: 0.4570 - ETA: 2s - loss: 8.6726 - acc: 0.4508 - ETA: 2s - loss: 8.6671 - acc: 0.4514 - ETA: 2s - loss: 8.6835 - acc: 0.4513 - ETA: 2s - loss: 8.6592 - acc: 0.4530 - ETA: 2s - loss: 8.7211 - acc: 0.4494 - ETA: 2s - loss: 8.7652 - acc: 0.4473 - ETA: 1s - loss: 8.7359 - acc: 0.4485 - ETA: 1s - loss: 8.7365 - acc: 0.4467 - ETA: 1s - loss: 8.7150 - acc: 0.4487 - ETA: 1s - loss: 8.6784 - acc: 0.4504 - ETA: 1s - loss: 8.7119 - acc: 0.4484 - ETA: 1s - loss: 8.7454 - acc: 0.4466 - ETA: 1s - loss: 8.7668 - acc: 0.4453 - ETA: 1s - loss: 8.8106 - acc: 0.4432 - ETA: 1s - loss: 8.8308 - acc: 0.4415 - ETA: 1s - loss: 8.8499 - acc: 0.4400 - ETA: 1s - loss: 8.9133 - acc: 0.4359 - ETA: 1s - loss: 8.8851 - acc: 0.4376 - ETA: 1s - loss: 8.9002 - acc: 0.4367 - ETA: 1s - loss: 8.8604 - acc: 0.4396 - ETA: 1s - loss: 8.8605 - acc: 0.4400 - ETA: 1s - loss: 8.8407 - acc: 0.4416 - ETA: 1s - loss: 8.7744 - acc: 0.4452 - ETA: 0s - loss: 8.7600 - acc: 0.4461 - ETA: 0s - loss: 8.7663 - acc: 0.4455 - ETA: 0s - loss: 8.7572 - acc: 0.4457 - ETA: 0s - loss: 8.7632 - acc: 0.4449 - ETA: 0s - loss: 8.7783 - acc: 0.4441 - ETA: 0s - loss: 8.7651 - acc: 0.4446 - ETA: 0s - loss: 8.8091 - acc: 0.4419 - ETA: 0s - loss: 8.8271 - acc: 0.4407 - ETA: 0s - loss: 8.8096 - acc: 0.4418 - ETA: 0s - loss: 8.8217 - acc: 0.4406 - ETA: 0s - loss: 8.7993 - acc: 0.4419 - ETA: 0s - loss: 8.8023 - acc: 0.4416 - ETA: 0s - loss: 8.8095 - acc: 0.4409 - ETA: 0s - loss: 8.7897 - acc: 0.4424 - ETA: 0s - loss: 8.8152 - acc: 0.4410 - ETA: 0s - loss: 8.8104 - acc: 0.4415 - ETA: 0s - loss: 8.8226 - acc: 0.4409 - ETA: 0s - loss: 8.8236 - acc: 0.4411Epoch 00013: val_loss did not improve
6680/6680 [==============================] - 2s - loss: 8.8311 - acc: 0.4407 - val_loss: 9.4237 - val_acc: 0.3617
Epoch 15/20
6640/6680 [============================>.] - ETA: 2s - loss: 9.6710 - acc: 0.4000 - ETA: 2s - loss: 9.4323 - acc: 0.4125 - ETA: 2s - loss: 9.2848 - acc: 0.4133 - ETA: 2s - loss: 8.7822 - acc: 0.4476 - ETA: 2s - loss: 8.8635 - acc: 0.4429 - ETA: 2s - loss: 9.0066 - acc: 0.4314 - ETA: 2s - loss: 8.9186 - acc: 0.4357 - ETA: 2s - loss: 8.7738 - acc: 0.4439 - ETA: 2s - loss: 8.8308 - acc: 0.4402 - ETA: 2s - loss: 8.9235 - acc: 0.4357 - ETA: 2s - loss: 8.7185 - acc: 0.4464 - ETA: 2s - loss: 8.7344 - acc: 0.4461 - ETA: 1s - loss: 8.7082 - acc: 0.4482 - ETA: 1s - loss: 8.7479 - acc: 0.4461 - ETA: 1s - loss: 8.7269 - acc: 0.4453 - ETA: 1s - loss: 8.7118 - acc: 0.4466 - ETA: 1s - loss: 8.7308 - acc: 0.4445 - ETA: 1s - loss: 8.7020 - acc: 0.4466 - ETA: 1s - loss: 8.7368 - acc: 0.4439 - ETA: 1s - loss: 8.7562 - acc: 0.4435 - ETA: 1s - loss: 8.7373 - acc: 0.4452 - ETA: 1s - loss: 8.7700 - acc: 0.4430 - ETA: 1s - loss: 8.7336 - acc: 0.4453 - ETA: 1s - loss: 8.7131 - acc: 0.4465 - ETA: 1s - loss: 8.6897 - acc: 0.4479 - ETA: 1s - loss: 8.6679 - acc: 0.4488 - ETA: 1s - loss: 8.6794 - acc: 0.4475 - ETA: 1s - loss: 8.6756 - acc: 0.4476 - ETA: 1s - loss: 8.6718 - acc: 0.4479 - ETA: 1s - loss: 8.6308 - acc: 0.4505 - ETA: 1s - loss: 8.6418 - acc: 0.4490 - ETA: 0s - loss: 8.6512 - acc: 0.4484 - ETA: 0s - loss: 8.6744 - acc: 0.4468 - ETA: 0s - loss: 8.6788 - acc: 0.4463 - ETA: 0s - loss: 8.6810 - acc: 0.4464 - ETA: 0s - loss: 8.6893 - acc: 0.4456 - ETA: 0s - loss: 8.7028 - acc: 0.4448 - ETA: 0s - loss: 8.6961 - acc: 0.4455 - ETA: 0s - loss: 8.6943 - acc: 0.4458 - ETA: 0s - loss: 8.6733 - acc: 0.4470 - ETA: 0s - loss: 8.6716 - acc: 0.4469 - ETA: 0s - loss: 8.6854 - acc: 0.4461 - ETA: 0s - loss: 8.6908 - acc: 0.4459 - ETA: 0s - loss: 8.7137 - acc: 0.4444 - ETA: 0s - loss: 8.7047 - acc: 0.4452 - ETA: 0s - loss: 8.6878 - acc: 0.4461 - ETA: 0s - loss: 8.6901 - acc: 0.4459 - ETA: 0s - loss: 8.6883 - acc: 0.4457 - ETA: 0s - loss: 8.6753 - acc: 0.4464Epoch 00014: val_loss improved from 9.33635 to 9.18629, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 8.6741 - acc: 0.4466 - val_loss: 9.1863 - val_acc: 0.3689
Epoch 16/20
6560/6680 [============================>.] - ETA: 2s - loss: 8.8978 - acc: 0.4500 - ETA: 2s - loss: 8.1696 - acc: 0.4833 - ETA: 2s - loss: 8.3296 - acc: 0.4735 - ETA: 2s - loss: 8.2283 - acc: 0.4792 - ETA: 2s - loss: 8.2417 - acc: 0.4790 - ETA: 2s - loss: 8.2854 - acc: 0.4763 - ETA: 2s - loss: 8.0790 - acc: 0.4889 - ETA: 2s - loss: 8.1700 - acc: 0.4846 - ETA: 2s - loss: 8.1843 - acc: 0.4831 - ETA: 1s - loss: 8.3219 - acc: 0.4750 - ETA: 1s - loss: 8.3900 - acc: 0.4699 - ETA: 1s - loss: 8.3646 - acc: 0.4713 - ETA: 1s - loss: 8.3340 - acc: 0.4727 - ETA: 1s - loss: 8.2880 - acc: 0.4763 - ETA: 1s - loss: 8.2835 - acc: 0.4765 - ETA: 1s - loss: 8.3067 - acc: 0.4738 - ETA: 1s - loss: 8.3330 - acc: 0.4702 - ETA: 1s - loss: 8.3461 - acc: 0.4694 - ETA: 1s - loss: 8.3312 - acc: 0.4707 - ETA: 1s - loss: 8.3505 - acc: 0.4689 - ETA: 1s - loss: 8.3941 - acc: 0.4665 - ETA: 1s - loss: 8.4275 - acc: 0.4651 - ETA: 1s - loss: 8.4272 - acc: 0.4653 - ETA: 1s - loss: 8.3835 - acc: 0.4680 - ETA: 1s - loss: 8.4216 - acc: 0.4652 - ETA: 1s - loss: 8.4185 - acc: 0.4654 - ETA: 1s - loss: 8.4501 - acc: 0.4630 - ETA: 1s - loss: 8.4538 - acc: 0.4628 - ETA: 1s - loss: 8.4439 - acc: 0.4625 - ETA: 0s - loss: 8.4390 - acc: 0.4633 - ETA: 0s - loss: 8.4243 - acc: 0.4643 - ETA: 0s - loss: 8.4674 - acc: 0.4620 - ETA: 0s - loss: 8.4482 - acc: 0.4627 - ETA: 0s - loss: 8.4504 - acc: 0.4622 - ETA: 0s - loss: 8.4514 - acc: 0.4622 - ETA: 0s - loss: 8.4985 - acc: 0.4593 - ETA: 0s - loss: 8.4723 - acc: 0.4608 - ETA: 0s - loss: 8.4682 - acc: 0.4610 - ETA: 0s - loss: 8.4720 - acc: 0.4607 - ETA: 0s - loss: 8.4434 - acc: 0.4629 - ETA: 0s - loss: 8.4404 - acc: 0.4632 - ETA: 0s - loss: 8.4537 - acc: 0.4624 - ETA: 0s - loss: 8.4644 - acc: 0.4618 - ETA: 0s - loss: 8.4699 - acc: 0.4615 - ETA: 0s - loss: 8.4563 - acc: 0.4625 - ETA: 0s - loss: 8.4750 - acc: 0.4614Epoch 00015: val_loss improved from 9.18629 to 9.07422, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 8.4820 - acc: 0.4611 - val_loss: 9.0742 - val_acc: 0.3641
Epoch 17/20
6560/6680 [============================>.] - ETA: 3s - loss: 10.4835 - acc: 0.3500 - ETA: 2s - loss: 8.3680 - acc: 0.4813  - ETA: 2s - loss: 8.5265 - acc: 0.4667 - ETA: 2s - loss: 8.5615 - acc: 0.4659 - ETA: 2s - loss: 8.3031 - acc: 0.4793 - ETA: 2s - loss: 8.5085 - acc: 0.4667 - ETA: 2s - loss: 8.3944 - acc: 0.4738 - ETA: 2s - loss: 8.3649 - acc: 0.4755 - ETA: 2s - loss: 8.4123 - acc: 0.4723 - ETA: 2s - loss: 8.4384 - acc: 0.4706 - ETA: 2s - loss: 8.4366 - acc: 0.4707 - ETA: 2s - loss: 8.4032 - acc: 0.4727 - ETA: 1s - loss: 8.4179 - acc: 0.4714 - ETA: 1s - loss: 8.3732 - acc: 0.4747 - ETA: 1s - loss: 8.4172 - acc: 0.4699 - ETA: 1s - loss: 8.4346 - acc: 0.4686 - ETA: 1s - loss: 8.4017 - acc: 0.4708 - ETA: 1s - loss: 8.3653 - acc: 0.4727 - ETA: 1s - loss: 8.3565 - acc: 0.4730 - ETA: 1s - loss: 8.4366 - acc: 0.4681 - ETA: 1s - loss: 8.4714 - acc: 0.4650 - ETA: 1s - loss: 8.4595 - acc: 0.4656 - ETA: 1s - loss: 8.4269 - acc: 0.4679 - ETA: 1s - loss: 8.4532 - acc: 0.4657 - ETA: 1s - loss: 8.4563 - acc: 0.4656 - ETA: 1s - loss: 8.4873 - acc: 0.4636 - ETA: 1s - loss: 8.4886 - acc: 0.4639 - ETA: 1s - loss: 8.5168 - acc: 0.4621 - ETA: 0s - loss: 8.4883 - acc: 0.4639 - ETA: 0s - loss: 8.5135 - acc: 0.4623 - ETA: 0s - loss: 8.4959 - acc: 0.4633 - ETA: 0s - loss: 8.4569 - acc: 0.4655 - ETA: 0s - loss: 8.4460 - acc: 0.4659 - ETA: 0s - loss: 8.4158 - acc: 0.4667 - ETA: 0s - loss: 8.4409 - acc: 0.4648 - ETA: 0s - loss: 8.4493 - acc: 0.4644 - ETA: 0s - loss: 8.4495 - acc: 0.4636 - ETA: 0s - loss: 8.4220 - acc: 0.4651 - ETA: 0s - loss: 8.3902 - acc: 0.4671 - ETA: 0s - loss: 8.3926 - acc: 0.4667 - ETA: 0s - loss: 8.3886 - acc: 0.4668 - ETA: 0s - loss: 8.3752 - acc: 0.4674 - ETA: 0s - loss: 8.3873 - acc: 0.4667 - ETA: 0s - loss: 8.4033 - acc: 0.4651 - ETA: 0s - loss: 8.3702 - acc: 0.4666 - ETA: 0s - loss: 8.3773 - acc: 0.4662 - ETA: 0s - loss: 8.3989 - acc: 0.4649Epoch 00016: val_loss improved from 9.07422 to 8.91292, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 8.3950 - acc: 0.4651 - val_loss: 8.9129 - val_acc: 0.3737
Epoch 18/20
6580/6680 [============================>.] - ETA: 2s - loss: 8.0809 - acc: 0.5000 - ETA: 2s - loss: 8.1404 - acc: 0.4688 - ETA: 2s - loss: 8.7795 - acc: 0.4357 - ETA: 2s - loss: 8.5661 - acc: 0.4500 - ETA: 2s - loss: 8.4959 - acc: 0.4571 - ETA: 2s - loss: 8.4835 - acc: 0.4586 - ETA: 2s - loss: 8.5537 - acc: 0.4512 - ETA: 2s - loss: 8.5704 - acc: 0.4490 - ETA: 2s - loss: 8.4929 - acc: 0.4518 - ETA: 2s - loss: 8.3169 - acc: 0.4587 - ETA: 2s - loss: 8.3925 - acc: 0.4550 - ETA: 1s - loss: 8.3623 - acc: 0.4565 - ETA: 1s - loss: 8.3711 - acc: 0.4565 - ETA: 1s - loss: 8.3696 - acc: 0.4560 - ETA: 1s - loss: 8.3604 - acc: 0.4566 - ETA: 1s - loss: 8.3894 - acc: 0.4562 - ETA: 1s - loss: 8.3545 - acc: 0.4585 - ETA: 1s - loss: 8.3116 - acc: 0.4618 - ETA: 1s - loss: 8.2302 - acc: 0.4663 - ETA: 1s - loss: 8.2413 - acc: 0.4654 - ETA: 1s - loss: 8.2005 - acc: 0.4679 - ETA: 1s - loss: 8.2289 - acc: 0.4663 - ETA: 1s - loss: 8.2143 - acc: 0.4679 - ETA: 1s - loss: 8.2656 - acc: 0.4652 - ETA: 1s - loss: 8.2647 - acc: 0.4640 - ETA: 1s - loss: 8.2570 - acc: 0.4646 - ETA: 1s - loss: 8.2571 - acc: 0.4643 - ETA: 1s - loss: 8.2580 - acc: 0.4638 - ETA: 1s - loss: 8.2843 - acc: 0.4628 - ETA: 0s - loss: 8.2746 - acc: 0.4633 - ETA: 0s - loss: 8.2622 - acc: 0.4640 - ETA: 0s - loss: 8.2378 - acc: 0.4661 - ETA: 0s - loss: 8.2486 - acc: 0.4656 - ETA: 0s - loss: 8.2476 - acc: 0.4659 - ETA: 0s - loss: 8.2270 - acc: 0.4665 - ETA: 0s - loss: 8.1817 - acc: 0.4696 - ETA: 0s - loss: 8.1844 - acc: 0.4696 - ETA: 0s - loss: 8.1547 - acc: 0.4714 - ETA: 0s - loss: 8.1424 - acc: 0.4722 - ETA: 0s - loss: 8.1380 - acc: 0.4727 - ETA: 0s - loss: 8.1191 - acc: 0.4738 - ETA: 0s - loss: 8.1200 - acc: 0.4735 - ETA: 0s - loss: 8.1336 - acc: 0.4730 - ETA: 0s - loss: 8.1460 - acc: 0.4721 - ETA: 0s - loss: 8.1301 - acc: 0.4731 - ETA: 0s - loss: 8.1115 - acc: 0.4745 - ETA: 0s - loss: 8.1120 - acc: 0.4746Epoch 00017: val_loss improved from 8.91292 to 8.70068, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 8.0984 - acc: 0.4754 - val_loss: 8.7007 - val_acc: 0.4000
Epoch 19/20
6600/6680 [============================>.] - ETA: 2s - loss: 5.6415 - acc: 0.6500 - ETA: 2s - loss: 6.9276 - acc: 0.5625 - ETA: 2s - loss: 7.0374 - acc: 0.5567 - ETA: 2s - loss: 7.3877 - acc: 0.5318 - ETA: 2s - loss: 7.6128 - acc: 0.5155 - ETA: 2s - loss: 7.7064 - acc: 0.5083 - ETA: 2s - loss: 7.7340 - acc: 0.5070 - ETA: 2s - loss: 7.8362 - acc: 0.5010 - ETA: 2s - loss: 7.8813 - acc: 0.4982 - ETA: 2s - loss: 7.8992 - acc: 0.4984 - ETA: 1s - loss: 7.8671 - acc: 0.5007 - ETA: 1s - loss: 7.9515 - acc: 0.4955 - ETA: 1s - loss: 7.9222 - acc: 0.4971 - ETA: 1s - loss: 7.9796 - acc: 0.4924 - ETA: 1s - loss: 7.9040 - acc: 0.4955 - ETA: 1s - loss: 7.9377 - acc: 0.4929 - ETA: 1s - loss: 7.9524 - acc: 0.4907 - ETA: 1s - loss: 7.9353 - acc: 0.4913 - ETA: 1s - loss: 7.9575 - acc: 0.4902 - ETA: 1s - loss: 7.9648 - acc: 0.4899 - ETA: 1s - loss: 8.0036 - acc: 0.4872 - ETA: 1s - loss: 8.0259 - acc: 0.4858 - ETA: 1s - loss: 8.0227 - acc: 0.4868 - ETA: 1s - loss: 7.9957 - acc: 0.4877 - ETA: 1s - loss: 7.9939 - acc: 0.4879 - ETA: 1s - loss: 7.9452 - acc: 0.4906 - ETA: 1s - loss: 7.9624 - acc: 0.4893 - ETA: 1s - loss: 7.9564 - acc: 0.4897 - ETA: 1s - loss: 7.9636 - acc: 0.4893 - ETA: 0s - loss: 7.9563 - acc: 0.4902 - ETA: 0s - loss: 7.9380 - acc: 0.4917 - ETA: 0s - loss: 7.8802 - acc: 0.4954 - ETA: 0s - loss: 7.8891 - acc: 0.4947 - ETA: 0s - loss: 7.9042 - acc: 0.4942 - ETA: 0s - loss: 7.9215 - acc: 0.4927 - ETA: 0s - loss: 7.9071 - acc: 0.4935 - ETA: 0s - loss: 7.9288 - acc: 0.4921 - ETA: 0s - loss: 7.9439 - acc: 0.4913 - ETA: 0s - loss: 7.9208 - acc: 0.4929 - ETA: 0s - loss: 7.9353 - acc: 0.4920 - ETA: 0s - loss: 7.9324 - acc: 0.4923 - ETA: 0s - loss: 7.9304 - acc: 0.4922 - ETA: 0s - loss: 7.9123 - acc: 0.4932 - ETA: 0s - loss: 7.9248 - acc: 0.4920 - ETA: 0s - loss: 7.9339 - acc: 0.4917 - ETA: 0s - loss: 7.9119 - acc: 0.4930 - ETA: 0s - loss: 7.9167 - acc: 0.4930 - ETA: 0s - loss: 7.9267 - acc: 0.4926Epoch 00018: val_loss improved from 8.70068 to 8.59105, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 7.9214 - acc: 0.4930 - val_loss: 8.5910 - val_acc: 0.3976
Epoch 20/20
6640/6680 [============================>.] - ETA: 2s - loss: 8.0055 - acc: 0.5000 - ETA: 2s - loss: 8.0813 - acc: 0.4937 - ETA: 2s - loss: 7.3038 - acc: 0.5344 - ETA: 2s - loss: 7.6442 - acc: 0.5130 - ETA: 2s - loss: 7.3777 - acc: 0.5283 - ETA: 2s - loss: 7.4310 - acc: 0.5250 - ETA: 2s - loss: 7.6121 - acc: 0.5152 - ETA: 2s - loss: 7.7534 - acc: 0.5075 - ETA: 1s - loss: 7.7923 - acc: 0.5025 - ETA: 1s - loss: 7.8466 - acc: 0.4985 - ETA: 1s - loss: 7.6874 - acc: 0.5081 - ETA: 1s - loss: 7.7170 - acc: 0.5067 - ETA: 1s - loss: 7.7945 - acc: 0.5017 - ETA: 1s - loss: 7.8007 - acc: 0.5010 - ETA: 1s - loss: 7.7909 - acc: 0.5010 - ETA: 1s - loss: 7.7740 - acc: 0.5023 - ETA: 1s - loss: 7.8650 - acc: 0.4970 - ETA: 1s - loss: 7.8544 - acc: 0.4972 - ETA: 1s - loss: 7.8611 - acc: 0.4966 - ETA: 1s - loss: 7.8695 - acc: 0.4964 - ETA: 1s - loss: 7.8258 - acc: 0.4983 - ETA: 1s - loss: 7.7842 - acc: 0.5007 - ETA: 1s - loss: 7.8077 - acc: 0.4997 - ETA: 1s - loss: 7.7772 - acc: 0.5018 - ETA: 1s - loss: 7.8214 - acc: 0.4997 - ETA: 1s - loss: 7.8272 - acc: 0.4983 - ETA: 1s - loss: 7.8375 - acc: 0.4979 - ETA: 1s - loss: 7.8654 - acc: 0.4966 - ETA: 1s - loss: 7.8573 - acc: 0.4975 - ETA: 0s - loss: 7.8481 - acc: 0.4978 - ETA: 0s - loss: 7.8560 - acc: 0.4972 - ETA: 0s - loss: 7.8329 - acc: 0.4984 - ETA: 0s - loss: 7.8128 - acc: 0.4998 - ETA: 0s - loss: 7.7866 - acc: 0.5015 - ETA: 0s - loss: 7.7656 - acc: 0.5029 - ETA: 0s - loss: 7.7800 - acc: 0.5018 - ETA: 0s - loss: 7.7636 - acc: 0.5025 - ETA: 0s - loss: 7.7551 - acc: 0.5031 - ETA: 0s - loss: 7.7722 - acc: 0.5021 - ETA: 0s - loss: 7.7383 - acc: 0.5040 - ETA: 0s - loss: 7.7325 - acc: 0.5046 - ETA: 0s - loss: 7.7176 - acc: 0.5052 - ETA: 0s - loss: 7.7111 - acc: 0.5056 - ETA: 0s - loss: 7.7446 - acc: 0.5036 - ETA: 0s - loss: 7.7547 - acc: 0.5032 - ETA: 0s - loss: 7.7525 - acc: 0.5035 - ETA: 0s - loss: 7.7714 - acc: 0.5022 - ETA: 0s - loss: 7.7900 - acc: 0.5012Epoch 00019: val_loss improved from 8.59105 to 8.48933, saving model to saved_models/weights.best.VGG16.hdf5
6680/6680 [==============================] - 2s - loss: 7.7870 - acc: 0.5013 - val_loss: 8.4893 - val_acc: 0.4036
Out[84]:
<keras.callbacks.History at 0x1cea168ce48>

(IMPLEMENTATION) Load the Model with the Best Validation Loss


In [85]:
### TODO: Load the model weights with the best validation loss.

VGG16_model.load_weights('saved_models/weights.best.Resnet50.hdf5')

(IMPLEMENTATION) Test the Model

Try out your model on the test dataset of dog images. Ensure that your test accuracy is greater than 60%.


In [86]:
### TODO: Calculate classification accuracy on the test dataset.

# get index of predicted dog breed for each image in test set
VGG16_predictions = [np.argmax(VGG16_model.predict(np.expand_dims(feature, axis=0))) for feature in test_VGG16]

# report test accuracy
test_accuracy = 100*np.sum(np.array(VGG16_predictions)==np.argmax(test_targets, axis=1))/len(VGG16_predictions)
print('Test accuracy: %.4f%%' % test_accuracy)


Test accuracy: 50.1196%

(IMPLEMENTATION) Predict Dog Breed with the Model

Write a function that takes an image path as input and returns the dog breed (Affenpinscher, Afghan_hound, etc) that is predicted by your model.

Similar to the analogous function in Step 5, your function should have three steps:

  1. Extract the bottleneck features corresponding to the chosen CNN model.
  2. Supply the bottleneck features as input to the model to return the predicted vector. Note that the argmax of this prediction vector gives the index of the predicted dog breed.
  3. Use the dog_names array defined in Step 0 of this notebook to return the corresponding breed.

The functions to extract the bottleneck features can be found in extract_bottleneck_features.py, and they have been imported in an earlier code cell. To obtain the bottleneck features corresponding to your chosen CNN architecture, you need to use the function

extract_{network}

where {network}, in the above filename, should be one of VGG19, Resnet50, InceptionV3, or Xception.


In [88]:
### TODO: Write a function that takes a path to an image as input
### and returns the dog breed that is predicted by the model.



def dog_breed(img_path):
    # extract bottleneck features
    bottleneck_feature = extract_VGG16(path_to_tensor(img_path))
    
    # obtain predicted vector
    predicted_vector = VGG16_model.predict(bottleneck_feature)
    
    # return dog breed that is predicted by the model
    return dog_names[np.argmax(predicted_vector)]

Step 6: Write your Algorithm

Write an algorithm that accepts a file path to an image and first determines whether the image contains a human, dog, or neither. Then,

  • if a dog is detected in the image, return the predicted breed.
  • if a human is detected in the image, return the resembling dog breed.
  • if neither is detected in the image, provide output that indicates an error.

You are welcome to write your own functions for detecting humans and dogs in images, but feel free to use the face_detector and dog_detector functions developed above. You are required to use your CNN from Step 5 to predict dog breed.

Some sample output for our algorithm is provided below, but feel free to design your own user experience!

(IMPLEMENTATION) Write your Algorithm


In [89]:
### TODO: Write your algorithm.
### Feel free to use as many code cells as needed.

def dog_breed_detector(img_path):
    breed = dog_breed(img_path) 
    
    # Display the image
    img = cv2.imread(img_path)
    cv_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
    plt.imshow(cv_rgb)
    plt.show()
    
    # Detect what it is
    if dog_detector(img_path):
        print("That's a dog. Breed: " + str(breed))
    elif face_detector(img_path):
        print("That's a human, but it looks like a " + str(breed))
    else:
        print("I can't detect anything!")

dog_breed_detector(train_files[0])


That's a dog. Breed: train\095.Kuvasz

Step 7: Test Your Algorithm

In this section, you will take your new algorithm for a spin! What kind of dog does the algorithm think that you look like? If you have a dog, does it predict your dog's breed accurately? If you have a cat, does it mistakenly think that your cat is a dog?

(IMPLEMENTATION) Test Your Algorithm on Sample Images!

Test your algorithm at least six images on your computer. Feel free to use any images you like. Use at least two human and two dog images.

Question 6: Is the output better than you expected :) ? Or worse :( ? Provide at least three possible points of improvement for your algorithm.

Answer:


In [90]:
## TODO: Execute your algorithm from Step 6 on
## at least 6 images on your computer.
## Feel free to use as many code cells as needed.

sample_files = np.array(glob("images/*"))
print(sample_files)


['images\\American_water_spaniel_00648.jpg' 'images\\Brittany_02625.jpg'
 'images\\Curly-coated_retriever_03896.jpg'
 'images\\Labrador_retriever_06449.jpg'
 'images\\Labrador_retriever_06455.jpg'
 'images\\Labrador_retriever_06457.jpg' 'images\\sample_cnn.png'
 'images\\sample_dog_output.png' 'images\\sample_human_output.png'
 'images\\Welsh_springer_spaniel_08203.jpg']

In [91]:
for path in sample_files:
    dog_breed_detector(path)


That's a dog. Breed: train\068.Flat-coated_retriever
That's a dog. Breed: train\037.Brittany
That's a dog. Breed: train\055.Curly-coated_retriever
That's a dog. Breed: train\096.Labrador_retriever
That's a dog. Breed: train\047.Chesapeake_bay_retriever
That's a dog. Breed: train\096.Labrador_retriever
I can't detect anything!
I can't detect anything!
That's a human, but it looks like a train\100.Lowchen
That's a dog. Breed: train\015.Basset_hound

Explanation of Testing of the Algorithm

In order to get a good idea of how this algorithm was working I decided to add in some images that I thought would be kind of tricky for the algorithm. All the test images can be found in the /images directory but a brief break down of the actual images and my analysis can be found below.

Image expected Predicted Description
1 American_water_spaniel Flat-coated_retriever was a dog
------ ------ ------- -------
2 Curly-coated_retriever Brittany was a dog
------ ------ ------- -------
3 Labrador_retriever Curly-coated_retriever was a dog
------ ------ ------- -------
4 Labrador_retriever Labrador_retriever was a dog
------ ------ ------- -------
5 Labrador_retriever Chesapeake_bay_retriever was a dog
------ ------ ------- -------
6 Labrador_retriever Labrador_retriever was a dog
------ ------ ------- -------
7 samle_table couldn't detect was a table
------ ------ ------- -------
8 sample_dog_output couldn't detect was a dog
------ ------ ------- -------
9 sample_human_output Lowchen was a human
------ ------ ------- -------
10 Welsh_springer_spaniel Basset_hound was a dog

This was interesting to see the results at the end of the experiement. A brief description of my views are below...

The algorithm, did not detect the American_water_spaniel and Curly-coated_retriever breeds. But it detected the 4 retrievers correctly from 3 to 6. For 7, it couldn't detect it because it was nor dog nor human. In 8, it couldn't detect the sample image of a dog. In 9, it could detect the human and resembled Alexis to Lowschen dog breed. In 10 it detected the Welsh_springer_spaniel wrongly as Basset_hound.


In [ ]: