2020年2月19日 星期三

One-hot encoding labels of targets V.S. Normal format labels

Experiment_ Prediction of Pokemon Combat outcomes

Experiment_ Prediction of Pokemon Combat outcomes

This example is in the brilliant book "輕鬆學會Google TensorFlow 2.0人工智慧深度學習實作開發"

輕鬆學會Google TensorFlow 2.0人工智慧深度學習實作開發
In [1]:
import os 
import numpy as np
import pandas as pd
import tensorflow as tf
import matplotlib.pylab as plt
from tensorflow import keras
from tensorflow.keras import layers
In [2]:
pokemon_df = pd.read_csv('./pokemon.csv')
pokemon_df.head(5)
Out[2]:
# Name Type 1 Type 2 HP Attack Defense Sp. Atk Sp. Def Speed Generation Legendary
0 1 Bulbasaur Grass Poison 45 49 49 65 65 45 1 False
1 2 Ivysaur Grass Poison 60 62 63 80 80 60 1 False
2 3 Venusaur Grass Poison 80 82 83 100 100 80 1 False
3 4 Mega Venusaur Grass Poison 80 100 123 122 120 80 1 False
4 5 Charmander Fire NaN 39 52 43 60 50 65 1 False
In [3]:
pokemon_df.set_index('#', inplace=True)
pokemon_df
Out[3]:
Name Type 1 Type 2 HP Attack Defense Sp. Atk Sp. Def Speed Generation Legendary
#
1 Bulbasaur Grass Poison 45 49 49 65 65 45 1 False
2 Ivysaur Grass Poison 60 62 63 80 80 60 1 False
3 Venusaur Grass Poison 80 82 83 100 100 80 1 False
4 Mega Venusaur Grass Poison 80 100 123 122 120 80 1 False
5 Charmander Fire NaN 39 52 43 60 50 65 1 False
... ... ... ... ... ... ... ... ... ... ... ...
796 Diancie Rock Fairy 50 100 150 100 150 50 6 True
797 Mega Diancie Rock Fairy 50 160 110 160 110 110 6 True
798 Hoopa Confined Psychic Ghost 80 110 60 150 130 70 6 True
799 Hoopa Unbound Psychic Dark 80 160 60 170 130 80 6 True
800 Volcanion Fire Water 80 110 120 130 90 70 6 True

800 rows ? 11 columns

In [4]:
combat_df = pd.read_csv('./combats.csv')
combat_df.head(5)
Out[4]:
First_pokemon Second_pokemon Winner
0 266 298 298
1 702 701 701
2 191 668 668
3 237 683 683
4 151 231 151

Load the NA values and re-fill

In [5]:
pokemon_df.info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 800 entries, 1 to 800
Data columns (total 11 columns):
Name          799 non-null object
Type 1        800 non-null object
Type 2        414 non-null object
HP            800 non-null int64
Attack        800 non-null int64
Defense       800 non-null int64
Sp. Atk       800 non-null int64
Sp. Def       800 non-null int64
Speed         800 non-null int64
Generation    800 non-null int64
Legendary     800 non-null bool
dtypes: bool(1), int64(7), object(3)
memory usage: 69.5+ KB
In [6]:
pokemon_df['Type 2'].value_counts(dropna = False)   
Out[6]:
NaN         386
Flying       97
Ground       35
Poison       34
Psychic      33
Fighting     26
Grass        25
Fairy        23
Steel        22
Dark         20
Dragon       18
Rock         14
Ghost        14
Ice          14
Water        14
Fire         12
Electric      6
Normal        4
Bug           3
Name: Type 2, dtype: int64
In [7]:
pokemon_df['Type 2'].fillna('empty', inplace=True)
pokemon_df['Type 2'].value_counts(dropna = False)  
Out[7]:
empty       386
Flying       97
Ground       35
Poison       34
Psychic      33
Fighting     26
Grass        25
Fairy        23
Steel        22
Dark         20
Dragon       18
Rock         14
Ghost        14
Ice          14
Water        14
Fire         12
Electric      6
Normal        4
Bug           3
Name: Type 2, dtype: int64

Data preprocess

In [8]:
print(combat_df.dtypes)
print('-'*30)
print(pokemon_df.dtypes)
First_pokemon     int64
Second_pokemon    int64
Winner            int64
dtype: object
------------------------------
Name          object
Type 1        object
Type 2        object
HP             int64
Attack         int64
Defense        int64
Sp. Atk        int64
Sp. Def        int64
Speed          int64
Generation     int64
Legendary       bool
dtype: object

Transfering the data into certain type which is more easier to be manipulated

In [9]:
pokemon_df['Type 1'] = pokemon_df['Type 1'].astype('category') #Transfer the origin type 'object' to 'category'
pokemon_df['Type 2'] = pokemon_df['Type 2'].astype('category') #type 'category' has many useful sub-functions
pokemon_df['Legendary'] = pokemon_df['Legendary'].astype('int')
pokemon_df.dtypes
Out[9]:
Name            object
Type 1        category
Type 2        category
HP               int64
Attack           int64
Defense          int64
Sp. Atk          int64
Sp. Def          int64
Speed            int64
Generation       int64
Legendary        int64
dtype: object

one-hot encoding

Function pandas.get_dummies() is used to encode 'category' varibles into one-hot encoding format.

In [10]:
df_type1_one_hot = pd.get_dummies(pokemon_df['Type 1'])
df_type1_one_hot.head(5)
Out[10]:
Type 1 Bug Dark Dragon Electric Fairy Fighting Fire Flying Ghost Grass Ground Ice Normal Poison Psychic Rock Steel Water
#
1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
In [11]:
df_type2_one_hot = pd.get_dummies(pokemon_df['Type 2'])
df_type2_one_hot.head(5)
Out[11]:
Type 2 Bug Dark Dragon Electric Fairy Fighting Fire Flying Ghost Grass Ground Ice Normal Poison Psychic Rock Steel Water empty
#
1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

Then combine 'Type 1' and 'Type 2' as one dataframe.

In [12]:
combine_df_one_hot = df_type1_one_hot.add(df_type2_one_hot, fill_value=0).astype('int64')
pd.options.display.max_columns = 30
pokemon_df = pokemon_df.join(combine_df_one_hot)
pokemon_df.head(5)
Out[12]:
Name Type 1 Type 2 HP Attack Defense Sp. Atk Sp. Def Speed Generation Legendary Bug Dark Dragon Electric Fairy Fighting Fire Flying Ghost Grass Ground Ice Normal Poison Psychic Rock Steel Water empty
#
1 Bulbasaur Grass Poison 45 49 49 65 65 45 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
2 Ivysaur Grass Poison 60 62 63 80 80 60 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
3 Venusaur Grass Poison 80 82 83 100 100 80 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
4 Mega Venusaur Grass Poison 80 100 123 122 120 80 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
5 Charmander Fire empty 39 52 43 60 50 65 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1

Inquire the labels of categories by cat.categories

In [13]:
dict(enumerate(pokemon_df['Type 2'].cat.categories))
Out[13]:
{0: 'Bug',
 1: 'Dark',
 2: 'Dragon',
 3: 'Electric',
 4: 'Fairy',
 5: 'Fighting',
 6: 'Fire',
 7: 'Flying',
 8: 'Ghost',
 9: 'Grass',
 10: 'Ground',
 11: 'Ice',
 12: 'Normal',
 13: 'Poison',
 14: 'Psychic',
 15: 'Rock',
 16: 'Steel',
 17: 'Water',
 18: 'empty'}
In [14]:
pokemon_df['Type 2'].cat.codes.head(10)
Out[14]:
#
1     13
2     13
3     13
4     13
5     18
6     18
7      7
8      2
9      7
10    18
dtype: int8
In [15]:
pokemon_df['Type 1'] = pokemon_df['Type 1'].cat.codes
pokemon_df['Type 2'] = pokemon_df['Type 2'].cat.codes
pokemon_df.drop('Name', axis=1, inplace=True)
pokemon_df.head(5)
Out[15]:
Type 1 Type 2 HP Attack Defense Sp. Atk Sp. Def Speed Generation Legendary Bug Dark Dragon Electric Fairy Fighting Fire Flying Ghost Grass Ground Ice Normal Poison Psychic Rock Steel Water empty
#
1 9 13 45 49 49 65 65 45 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
2 9 13 60 62 63 80 80 60 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
3 9 13 80 82 83 100 100 80 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
4 9 13 80 100 123 122 120 80 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
5 6 18 39 52 43 60 50 65 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1

The first argument in .apply() is a customized fuction. 'axis' set as 'column' will process the data with the funcion row by row.

Signature:

    df.apply(
        func,
        axis=0,
        broadcast=None,
        raw=False,
        reduce=None,
        result_type=None,
        args=(),
        **kwds,
    )

Docstring: Apply a function along an axis of the DataFrame.

Objects passed to the function are Series objects whose index is either the DataFrame's index (axis=0) or the DataFrame's columns (axis=1). By default (result_type=None), the final return type is inferred from the return type of the applied function. Otherwise, it depends on the result_type argument.

In [19]:
combat_df['Winner'] = combat_df.apply(lambda x: 0
                                     if x.Winner == x.First_pokemon
                                     else 1,
                                     axis = 1)
combat_df.head(5)
Out[19]:
First_pokemon Second_pokemon Winner
0 266 298 1
1 702 701 1
2 191 668 1
3 237 683 1
4 151 231 0

Separate the original data into 3 sets: Training, Validation, Testing

step follows:

  1. generate a random num index with the same size as the aiming data.
  2. separate the indexes as Train, Validation and Testing with ratio 6:2:2.
In [20]:
data_num = combat_df.shape[0]  #axis set as row 
indexes = np.random.permutation(data_num)
tr_indexes = indexes[:int(data_num*.6)]
val_indexes = indexes[int(data_num*.6):int(data_num*.8)]
ts_indexes = indexes[int(data_num*.8):]
tr_data = combat_df.loc[tr_indexes]
val_data = combat_df.loc[val_indexes]
ts_data = combat_df.loc[ts_indexes]

Normalization

In [21]:
pokemon_df['Type 1'] = pokemon_df['Type 1']/19  #dividen by 19 which is the number of attribute.
pokemon_df['Type 2'] = pokemon_df['Type 2']/19
In [34]:
mean_pk = pokemon_df.loc[:, 'HP':'Generation'].mean()
std_pk = pokemon_df.loc[:, 'HP':'Generation'].std()
pokemon_df.loc[:,'HP':'Generation'] = (pokemon_df.loc[:,'HP':'Generation']-mean_pk)/std_pk
pokemon_df
Out[34]:
Type 1 Type 2 HP Attack Defense Sp. Atk Sp. Def Speed Generation Legendary Bug Dark Dragon Electric Fairy Fighting Fire Flying Ghost Grass Ground Ice Normal Poison Psychic Rock Steel Water empty
#
1 0.473684 0.684211 -0.950032 -0.924328 -0.796655 -0.238981 -0.248033 -0.801002 -1.398762 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
2 0.473684 0.684211 -0.362595 -0.523803 -0.347700 0.219422 0.290974 -0.284837 -1.398762 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
3 0.473684 0.684211 0.420654 0.092390 0.293665 0.830626 1.009651 0.403383 -1.398762 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
4 0.473684 0.684211 0.420654 0.646964 1.576395 1.502951 1.728328 0.403383 -1.398762 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
5 0.315789 0.947368 -1.185007 -0.831899 -0.989065 -0.391782 -0.787041 -0.112782 -1.398762 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
796 0.789474 0.210526 -0.754220 0.646964 2.442237 0.830626 2.806344 -0.628947 1.610947 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0
797 0.789474 0.210526 -0.754220 2.495543 1.159507 2.664239 1.368990 1.435713 1.610947 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0
798 0.736842 0.421053 0.420654 0.955061 -0.443905 2.358637 2.087667 0.059273 1.610947 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0
799 0.736842 0.052632 0.420654 2.495543 -0.443905 2.969841 2.087667 0.403383 1.610947 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
800 0.315789 0.894737 0.420654 0.955061 1.480190 1.747432 0.650313 0.059273 1.610947 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0

800 rows ? 29 columns

Build the training data of Numpy array

In [26]:
xtr_index= np.array(tr_data.drop('Winner', axis=1))
xval_index = np.array(val_data.drop('Winner', axis=1))
xts_index = np.array(ts_data.drop('Winner', axis=1))
print(xtr_index)                  
[[592 374]
 [307 320]
 [591 488]
 ...
 [244 409]
 [460   7]
 [312 723]]
In [27]:
ytr = np.array(tr_data['Winner'])
yval = np.array(val_data['Winner'])
yts = np.array(ts_data['Winner'])
yts
Out[27]:
array([0, 1, 1, ..., 0, 1, 1])
In [40]:
#get the normal data
pokemon_data_normal = np.array(pokemon_df.loc[:, :'Legendary'])
print(pokemon_data_normal[1].shape)

xtr_normal = pokemon_data_normal[xtr_index-1].reshape((-1,20))
xval_normal = pokemon_data_normal[xval_index-1].reshape((-1,20))
xts_normal = pokemon_data_normal[xts_index-1].reshape((-1,20))
xts_normal[1]
(10,)
Out[40]:
array([ 0.42105263,  0.94736842, -1.92909295, -1.20161476,  0.5181426 ,
       -1.30858795,  0.65031279, -1.48922211, -0.19487863,  0.        ,
        0.68421053,  0.36842105,  0.22484137,  0.03077114, -0.12322221,
       -0.2389808 ,  0.11130509,  0.74749298, -1.39876207,  0.        ])
In [41]:
pokemon_data_one_hot = np.array(pokemon_df.loc[:,'HP':])
print(pokemon_data_one_hot[1].shape)
xtr_one_hot = pokemon_data_one_hot[xtr_index-1].reshape((-1,54))
xval_one_hot = pokemon_data_one_hot[xval_index-1].reshape((-1,54))
xts_one_hot = pokemon_data_one_hot[xts_index-1].reshape((-1,54))
xval_one_hot[1]                                   
(27,)
Out[41]:
array([-0.55840747, -0.27732534, -0.60424582, -1.00298591, -0.60737185,
        0.57543797, -0.79682035,  0.        ,  0.        ,  0.        ,
        0.        ,  0.        ,  0.        ,  0.        ,  0.        ,
        0.        ,  0.        ,  0.        ,  0.        ,  0.        ,
        1.        ,  0.        ,  0.        ,  0.        ,  0.        ,
        0.        ,  1.        , -1.02835678, -1.50971124, -0.60424582,
       -1.00298591, -0.24803338,  0.98836999, -0.19487863,  0.        ,
        0.        ,  0.        ,  0.        ,  0.        ,  0.        ,
        0.        ,  0.        ,  0.        ,  0.        ,  0.        ,
        0.        ,  0.        ,  0.        ,  0.        ,  0.        ,
        0.        ,  0.        ,  1.        ,  1.        ])

Build the model training by normal data

In [42]:
inputs = keras.Input(shape= (20,))
x = layers.Dense(64, activation='relu')(inputs)
x = layers.Dropout(.3)(x)
x = layers.Dense(64, activation='relu')(x)
x = layers.Dropout(.3)(x)
x = layers.Dense(64, activation='relu')(x)
x = layers.Dropout(.3)(x)
x = layers.Dense(16, activation='relu')(x)
x = layers.Dropout(.3)(x)
outputs = layers.Dense(1, activation='sigmoid')(x)

model_1 = keras.Model(inputs, outputs, name='model-1')
model_1.summary()
Model: "model-1"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
input_1 (InputLayer)         [(None, 20)]              0         
_________________________________________________________________
dense (Dense)                (None, 64)                1344      
_________________________________________________________________
dropout (Dropout)            (None, 64)                0         
_________________________________________________________________
dense_1 (Dense)              (None, 64)                4160      
_________________________________________________________________
dropout_1 (Dropout)          (None, 64)                0         
_________________________________________________________________
dense_2 (Dense)              (None, 64)                4160      
_________________________________________________________________
dropout_2 (Dropout)          (None, 64)                0         
_________________________________________________________________
dense_3 (Dense)              (None, 16)                1040      
_________________________________________________________________
dropout_3 (Dropout)          (None, 16)                0         
_________________________________________________________________
dense_4 (Dense)              (None, 1)                 17        
=================================================================
Total params: 10,721
Trainable params: 10,721
Non-trainable params: 0
_________________________________________________________________
In [43]:
model_1.compile(keras.optimizers.Adam(), 
                loss = keras.losses.BinaryCrossentropy(),
                metrics=[ keras.metrics.BinaryAccuracy()])
In [44]:
# set the directory of saving the model
model_dir = 'lab3-log/models'
os.makedirs(model_dir)
In [45]:
# log the training, and save it 
log_dir =os.path.join('lab3-log', 'model-1')
model_cbk = keras.callbacks.TensorBoard(log_dir=log_dir)
# save the best parameters
model_mckp = keras.callbacks.ModelCheckpoint(model_dir+'/Best-model-1.h5',monitor='val_binary_accuracy',
                                             save_best_only=True, mode='max')
In [46]:
history_1 = model_1.fit(xtr_normal, ytr, batch_size = 64, epochs=200, validation_data=(xval_normal, yval),
                        callbacks=[model_cbk, model_mckp])
Train on 30000 samples, validate on 10000 samples
Epoch 1/200
30000/30000 [==============================] - 4s 133us/sample - loss: 0.4507 - binary_accuracy: 0.8106 - val_loss: 0.3093 - val_binary_accuracy: 0.9088
Epoch 2/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.3365 - binary_accuracy: 0.8914 - val_loss: 0.2506 - val_binary_accuracy: 0.9233
Epoch 3/200
30000/30000 [==============================] - 2s 62us/sample - loss: 0.2835 - binary_accuracy: 0.9068 - val_loss: 0.2059 - val_binary_accuracy: 0.9282
Epoch 4/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.2547 - binary_accuracy: 0.9159 - val_loss: 0.1971 - val_binary_accuracy: 0.9296
Epoch 5/200
30000/30000 [==============================] - 2s 63us/sample - loss: 0.2360 - binary_accuracy: 0.9228 - val_loss: 0.1889 - val_binary_accuracy: 0.9312
Epoch 6/200
30000/30000 [==============================] - 2s 63us/sample - loss: 0.2263 - binary_accuracy: 0.9266 - val_loss: 0.1803 - val_binary_accuracy: 0.9373
Epoch 7/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.2172 - binary_accuracy: 0.9289 - val_loss: 0.1767 - val_binary_accuracy: 0.9370
Epoch 8/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.2097 - binary_accuracy: 0.9333 - val_loss: 0.1749 - val_binary_accuracy: 0.9437
Epoch 9/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.2051 - binary_accuracy: 0.9342 - val_loss: 0.1740 - val_binary_accuracy: 0.9444
Epoch 10/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.2031 - binary_accuracy: 0.9347 - val_loss: 0.1762 - val_binary_accuracy: 0.9410
Epoch 11/200
30000/30000 [==============================] - 2s 60us/sample - loss: 0.2011 - binary_accuracy: 0.9363 - val_loss: 0.1729 - val_binary_accuracy: 0.9429
Epoch 12/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1990 - binary_accuracy: 0.9367 - val_loss: 0.1805 - val_binary_accuracy: 0.9397
Epoch 13/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1961 - binary_accuracy: 0.9375 - val_loss: 0.1720 - val_binary_accuracy: 0.9445
Epoch 14/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1952 - binary_accuracy: 0.9365 - val_loss: 0.1682 - val_binary_accuracy: 0.9475
Epoch 15/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.1941 - binary_accuracy: 0.9381 - val_loss: 0.1674 - val_binary_accuracy: 0.9469
Epoch 16/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1916 - binary_accuracy: 0.9383 - val_loss: 0.1682 - val_binary_accuracy: 0.9467
Epoch 17/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1899 - binary_accuracy: 0.9384 - val_loss: 0.1663 - val_binary_accuracy: 0.9470
Epoch 18/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1884 - binary_accuracy: 0.9405 - val_loss: 0.1659 - val_binary_accuracy: 0.9467
Epoch 19/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1885 - binary_accuracy: 0.9420 - val_loss: 0.1750 - val_binary_accuracy: 0.9403
Epoch 20/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1885 - binary_accuracy: 0.9398 - val_loss: 0.1668 - val_binary_accuracy: 0.9454
Epoch 21/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1846 - binary_accuracy: 0.9405 - val_loss: 0.1674 - val_binary_accuracy: 0.9448
Epoch 22/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1858 - binary_accuracy: 0.9404 - val_loss: 0.1661 - val_binary_accuracy: 0.9466
Epoch 23/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1836 - binary_accuracy: 0.9407 - val_loss: 0.1653 - val_binary_accuracy: 0.9470
Epoch 24/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1843 - binary_accuracy: 0.9408 - val_loss: 0.1640 - val_binary_accuracy: 0.9479
Epoch 25/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1834 - binary_accuracy: 0.9411 - val_loss: 0.1656 - val_binary_accuracy: 0.9468
Epoch 26/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1844 - binary_accuracy: 0.9409 - val_loss: 0.1696 - val_binary_accuracy: 0.9444
Epoch 27/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1841 - binary_accuracy: 0.9420 - val_loss: 0.1665 - val_binary_accuracy: 0.9456
Epoch 28/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1821 - binary_accuracy: 0.9412 - val_loss: 0.1609 - val_binary_accuracy: 0.9457
Epoch 29/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1812 - binary_accuracy: 0.9427 - val_loss: 0.1616 - val_binary_accuracy: 0.9468
Epoch 30/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1802 - binary_accuracy: 0.9422 - val_loss: 0.1633 - val_binary_accuracy: 0.9470
Epoch 31/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1800 - binary_accuracy: 0.9428 - val_loss: 0.1651 - val_binary_accuracy: 0.9458
Epoch 32/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1818 - binary_accuracy: 0.9417 - val_loss: 0.1595 - val_binary_accuracy: 0.9484
Epoch 33/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1806 - binary_accuracy: 0.9426 - val_loss: 0.1604 - val_binary_accuracy: 0.9486
Epoch 34/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1783 - binary_accuracy: 0.9432 - val_loss: 0.1604 - val_binary_accuracy: 0.9480
Epoch 35/200
30000/30000 [==============================] - 2s 64us/sample - loss: 0.1792 - binary_accuracy: 0.9424 - val_loss: 0.1604 - val_binary_accuracy: 0.9488
Epoch 36/200
30000/30000 [==============================] - 2s 69us/sample - loss: 0.1749 - binary_accuracy: 0.9433 - val_loss: 0.1608 - val_binary_accuracy: 0.9475
Epoch 37/200
30000/30000 [==============================] - 2s 75us/sample - loss: 0.1759 - binary_accuracy: 0.9437 - val_loss: 0.1617 - val_binary_accuracy: 0.9472
Epoch 38/200
30000/30000 [==============================] - 2s 64us/sample - loss: 0.1784 - binary_accuracy: 0.9424 - val_loss: 0.1622 - val_binary_accuracy: 0.9462
Epoch 39/200
30000/30000 [==============================] - 2s 67us/sample - loss: 0.1777 - binary_accuracy: 0.9441 - val_loss: 0.1647 - val_binary_accuracy: 0.9464
Epoch 40/200
30000/30000 [==============================] - 2s 73us/sample - loss: 0.1745 - binary_accuracy: 0.9439 - val_loss: 0.1607 - val_binary_accuracy: 0.9473
Epoch 41/200
30000/30000 [==============================] - 2s 62us/sample - loss: 0.1771 - binary_accuracy: 0.9427 - val_loss: 0.1638 - val_binary_accuracy: 0.9466
Epoch 42/200
30000/30000 [==============================] - 2s 64us/sample - loss: 0.1745 - binary_accuracy: 0.9431 - val_loss: 0.1639 - val_binary_accuracy: 0.9471
Epoch 43/200
30000/30000 [==============================] - 2s 70us/sample - loss: 0.1747 - binary_accuracy: 0.9441 - val_loss: 0.1672 - val_binary_accuracy: 0.9460
Epoch 44/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1778 - binary_accuracy: 0.9439 - val_loss: 0.1647 - val_binary_accuracy: 0.9458
Epoch 45/200
30000/30000 [==============================] - 2s 60us/sample - loss: 0.1738 - binary_accuracy: 0.9444 - val_loss: 0.1605 - val_binary_accuracy: 0.9488
Epoch 46/200
30000/30000 [==============================] - 2s 61us/sample - loss: 0.1756 - binary_accuracy: 0.9429 - val_loss: 0.1665 - val_binary_accuracy: 0.9452
Epoch 47/200
30000/30000 [==============================] - 2s 66us/sample - loss: 0.1744 - binary_accuracy: 0.9441 - val_loss: 0.1601 - val_binary_accuracy: 0.9491
Epoch 48/200
30000/30000 [==============================] - 2s 61us/sample - loss: 0.1745 - binary_accuracy: 0.9439 - val_loss: 0.1678 - val_binary_accuracy: 0.9448
Epoch 49/200
30000/30000 [==============================] - 2s 61us/sample - loss: 0.1721 - binary_accuracy: 0.9453 - val_loss: 0.1639 - val_binary_accuracy: 0.9473
Epoch 50/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.1727 - binary_accuracy: 0.9453 - val_loss: 0.1633 - val_binary_accuracy: 0.9479
Epoch 51/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1720 - binary_accuracy: 0.9441 - val_loss: 0.1669 - val_binary_accuracy: 0.9455
Epoch 52/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1735 - binary_accuracy: 0.9436 - val_loss: 0.1630 - val_binary_accuracy: 0.9467
Epoch 53/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1692 - binary_accuracy: 0.9457 - val_loss: 0.1629 - val_binary_accuracy: 0.9469
Epoch 54/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1722 - binary_accuracy: 0.9435 - val_loss: 0.1617 - val_binary_accuracy: 0.9464
Epoch 55/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1720 - binary_accuracy: 0.9446 - val_loss: 0.1705 - val_binary_accuracy: 0.9462
Epoch 56/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1733 - binary_accuracy: 0.9464 - val_loss: 0.1594 - val_binary_accuracy: 0.9479
Epoch 57/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.1712 - binary_accuracy: 0.9452 - val_loss: 0.1618 - val_binary_accuracy: 0.9477
Epoch 58/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.1699 - binary_accuracy: 0.9452 - val_loss: 0.1602 - val_binary_accuracy: 0.9492
Epoch 59/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1707 - binary_accuracy: 0.9452 - val_loss: 0.1624 - val_binary_accuracy: 0.9489
Epoch 60/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1721 - binary_accuracy: 0.9444 - val_loss: 0.1577 - val_binary_accuracy: 0.9506
Epoch 61/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1691 - binary_accuracy: 0.9451 - val_loss: 0.1612 - val_binary_accuracy: 0.9475
Epoch 62/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.1668 - binary_accuracy: 0.9460 - val_loss: 0.1754 - val_binary_accuracy: 0.9424
Epoch 63/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1711 - binary_accuracy: 0.9456 - val_loss: 0.1611 - val_binary_accuracy: 0.9475
Epoch 64/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.1692 - binary_accuracy: 0.9451 - val_loss: 0.1592 - val_binary_accuracy: 0.9477
Epoch 65/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1683 - binary_accuracy: 0.9456 - val_loss: 0.1701 - val_binary_accuracy: 0.9439
Epoch 66/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1672 - binary_accuracy: 0.9456 - val_loss: 0.1584 - val_binary_accuracy: 0.9481
Epoch 67/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1686 - binary_accuracy: 0.9457 - val_loss: 0.1594 - val_binary_accuracy: 0.9468
Epoch 68/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1663 - binary_accuracy: 0.9451 - val_loss: 0.1604 - val_binary_accuracy: 0.9481
Epoch 69/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1700 - binary_accuracy: 0.9454 - val_loss: 0.1592 - val_binary_accuracy: 0.9462
Epoch 70/200
30000/30000 [==============================] - 2s 60us/sample - loss: 0.1625 - binary_accuracy: 0.9467 - val_loss: 0.1584 - val_binary_accuracy: 0.9488
Epoch 71/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1669 - binary_accuracy: 0.9470 - val_loss: 0.1643 - val_binary_accuracy: 0.9459
Epoch 72/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1672 - binary_accuracy: 0.9468 - val_loss: 0.1618 - val_binary_accuracy: 0.9475
Epoch 73/200
30000/30000 [==============================] - 2s 71us/sample - loss: 0.1665 - binary_accuracy: 0.9458 - val_loss: 0.1613 - val_binary_accuracy: 0.9477
Epoch 74/200
30000/30000 [==============================] - 2s 75us/sample - loss: 0.1674 - binary_accuracy: 0.9471 - val_loss: 0.1592 - val_binary_accuracy: 0.9486
Epoch 75/200
30000/30000 [==============================] - 2s 62us/sample - loss: 0.1654 - binary_accuracy: 0.9473 - val_loss: 0.1590 - val_binary_accuracy: 0.9470
Epoch 76/200
30000/30000 [==============================] - 2s 76us/sample - loss: 0.1676 - binary_accuracy: 0.9460 - val_loss: 0.1677 - val_binary_accuracy: 0.9466
Epoch 77/200
30000/30000 [==============================] - 2s 61us/sample - loss: 0.1651 - binary_accuracy: 0.9471 - val_loss: 0.1569 - val_binary_accuracy: 0.9491
Epoch 78/200
30000/30000 [==============================] - 2s 62us/sample - loss: 0.1637 - binary_accuracy: 0.9458 - val_loss: 0.1584 - val_binary_accuracy: 0.9480
Epoch 79/200
30000/30000 [==============================] - 2s 66us/sample - loss: 0.1673 - binary_accuracy: 0.9468 - val_loss: 0.1604 - val_binary_accuracy: 0.9478
Epoch 80/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1668 - binary_accuracy: 0.9461 - val_loss: 0.1582 - val_binary_accuracy: 0.9482
Epoch 81/200
30000/30000 [==============================] - 2s 70us/sample - loss: 0.1639 - binary_accuracy: 0.9460 - val_loss: 0.1619 - val_binary_accuracy: 0.9470
Epoch 82/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1644 - binary_accuracy: 0.9466 - val_loss: 0.1624 - val_binary_accuracy: 0.9497
Epoch 83/200
30000/30000 [==============================] - 2s 67us/sample - loss: 0.1627 - binary_accuracy: 0.9467 - val_loss: 0.1605 - val_binary_accuracy: 0.9466
Epoch 84/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1662 - binary_accuracy: 0.9470 - val_loss: 0.1589 - val_binary_accuracy: 0.9485
Epoch 85/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1652 - binary_accuracy: 0.9460 - val_loss: 0.1551 - val_binary_accuracy: 0.9478
Epoch 86/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1636 - binary_accuracy: 0.9473 - val_loss: 0.1562 - val_binary_accuracy: 0.9491
Epoch 87/200
30000/30000 [==============================] - 2s 62us/sample - loss: 0.1650 - binary_accuracy: 0.9475 - val_loss: 0.1580 - val_binary_accuracy: 0.9483
Epoch 88/200
30000/30000 [==============================] - 2s 69us/sample - loss: 0.1646 - binary_accuracy: 0.9479 - val_loss: 0.1567 - val_binary_accuracy: 0.9491
Epoch 89/200
30000/30000 [==============================] - 2s 61us/sample - loss: 0.1619 - binary_accuracy: 0.9463 - val_loss: 0.1623 - val_binary_accuracy: 0.9475
Epoch 90/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1598 - binary_accuracy: 0.9480 - val_loss: 0.1618 - val_binary_accuracy: 0.9469
Epoch 91/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1665 - binary_accuracy: 0.9464 - val_loss: 0.1593 - val_binary_accuracy: 0.9496
Epoch 92/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1616 - binary_accuracy: 0.9475 - val_loss: 0.1586 - val_binary_accuracy: 0.9498
Epoch 93/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1632 - binary_accuracy: 0.9476 - val_loss: 0.1559 - val_binary_accuracy: 0.9504
Epoch 94/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1635 - binary_accuracy: 0.9480 - val_loss: 0.1565 - val_binary_accuracy: 0.9474
Epoch 95/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1628 - binary_accuracy: 0.9470 - val_loss: 0.1572 - val_binary_accuracy: 0.9480
Epoch 96/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1642 - binary_accuracy: 0.9470 - val_loss: 0.1575 - val_binary_accuracy: 0.9493
Epoch 97/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1590 - binary_accuracy: 0.9484 - val_loss: 0.1618 - val_binary_accuracy: 0.9474
Epoch 98/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1646 - binary_accuracy: 0.9474 - val_loss: 0.1583 - val_binary_accuracy: 0.9478
Epoch 99/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1593 - binary_accuracy: 0.9485 - val_loss: 0.1572 - val_binary_accuracy: 0.9483
Epoch 100/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.1632 - binary_accuracy: 0.9481 - val_loss: 0.1582 - val_binary_accuracy: 0.9491
Epoch 101/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1626 - binary_accuracy: 0.9477 - val_loss: 0.1593 - val_binary_accuracy: 0.9495
Epoch 102/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.1624 - binary_accuracy: 0.9481 - val_loss: 0.1575 - val_binary_accuracy: 0.9497
Epoch 103/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.1608 - binary_accuracy: 0.9483 - val_loss: 0.1581 - val_binary_accuracy: 0.9488
Epoch 104/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1625 - binary_accuracy: 0.9485 - val_loss: 0.1551 - val_binary_accuracy: 0.9492
Epoch 105/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1602 - binary_accuracy: 0.9485 - val_loss: 0.1574 - val_binary_accuracy: 0.9481
Epoch 106/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1608 - binary_accuracy: 0.9479 - val_loss: 0.1553 - val_binary_accuracy: 0.9486
Epoch 107/200
30000/30000 [==============================] - 2s 60us/sample - loss: 0.1610 - binary_accuracy: 0.9477 - val_loss: 0.1602 - val_binary_accuracy: 0.9464
Epoch 108/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1616 - binary_accuracy: 0.9471 - val_loss: 0.1591 - val_binary_accuracy: 0.9475
Epoch 109/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.1614 - binary_accuracy: 0.9480 - val_loss: 0.1595 - val_binary_accuracy: 0.9470
Epoch 110/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1620 - binary_accuracy: 0.9475 - val_loss: 0.1574 - val_binary_accuracy: 0.9481
Epoch 111/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1611 - binary_accuracy: 0.9469 - val_loss: 0.1585 - val_binary_accuracy: 0.9483
Epoch 112/200
30000/30000 [==============================] - 2s 64us/sample - loss: 0.1605 - binary_accuracy: 0.9491 - val_loss: 0.1624 - val_binary_accuracy: 0.9471
Epoch 113/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1576 - binary_accuracy: 0.9482 - val_loss: 0.1576 - val_binary_accuracy: 0.9489
Epoch 114/200
30000/30000 [==============================] - 2s 67us/sample - loss: 0.1603 - binary_accuracy: 0.9475 - val_loss: 0.1571 - val_binary_accuracy: 0.9498
Epoch 115/200
30000/30000 [==============================] - 2s 69us/sample - loss: 0.1582 - binary_accuracy: 0.9487 - val_loss: 0.1585 - val_binary_accuracy: 0.9482
Epoch 116/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1628 - binary_accuracy: 0.9475 - val_loss: 0.1586 - val_binary_accuracy: 0.9466
Epoch 117/200
30000/30000 [==============================] - 2s 64us/sample - loss: 0.1587 - binary_accuracy: 0.9481 - val_loss: 0.1565 - val_binary_accuracy: 0.9493
Epoch 118/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1619 - binary_accuracy: 0.9484 - val_loss: 0.1587 - val_binary_accuracy: 0.9487
Epoch 119/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1593 - binary_accuracy: 0.9486 - val_loss: 0.1587 - val_binary_accuracy: 0.9485
Epoch 120/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1589 - binary_accuracy: 0.9487 - val_loss: 0.1607 - val_binary_accuracy: 0.9478
Epoch 121/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.1595 - binary_accuracy: 0.9487 - val_loss: 0.1557 - val_binary_accuracy: 0.9498
Epoch 122/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1611 - binary_accuracy: 0.9478 - val_loss: 0.1546 - val_binary_accuracy: 0.9487
Epoch 123/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1584 - binary_accuracy: 0.9488 - val_loss: 0.1570 - val_binary_accuracy: 0.9491
Epoch 124/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1580 - binary_accuracy: 0.9489 - val_loss: 0.1551 - val_binary_accuracy: 0.9498
Epoch 125/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.1583 - binary_accuracy: 0.9493 - val_loss: 0.1578 - val_binary_accuracy: 0.9484
Epoch 126/200
30000/30000 [==============================] - 2s 79us/sample - loss: 0.1579 - binary_accuracy: 0.9493 - val_loss: 0.1572 - val_binary_accuracy: 0.9484
Epoch 127/200
30000/30000 [==============================] - 2s 66us/sample - loss: 0.1595 - binary_accuracy: 0.9491 - val_loss: 0.1588 - val_binary_accuracy: 0.9471
Epoch 128/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1579 - binary_accuracy: 0.9493 - val_loss: 0.1596 - val_binary_accuracy: 0.9476
Epoch 129/200
30000/30000 [==============================] - 2s 77us/sample - loss: 0.1585 - binary_accuracy: 0.9474 - val_loss: 0.1575 - val_binary_accuracy: 0.9483
Epoch 130/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1598 - binary_accuracy: 0.9485 - val_loss: 0.1602 - val_binary_accuracy: 0.9469
Epoch 131/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1586 - binary_accuracy: 0.9477 - val_loss: 0.1562 - val_binary_accuracy: 0.9479
Epoch 132/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1577 - binary_accuracy: 0.9485 - val_loss: 0.1559 - val_binary_accuracy: 0.9491
Epoch 133/200
30000/30000 [==============================] - 2s 69us/sample - loss: 0.1563 - binary_accuracy: 0.9484 - val_loss: 0.1533 - val_binary_accuracy: 0.9489
Epoch 134/200
30000/30000 [==============================] - 2s 68us/sample - loss: 0.1595 - binary_accuracy: 0.9481 - val_loss: 0.1540 - val_binary_accuracy: 0.9497
Epoch 135/200
30000/30000 [==============================] - 2s 68us/sample - loss: 0.1577 - binary_accuracy: 0.9480 - val_loss: 0.1593 - val_binary_accuracy: 0.9485
Epoch 136/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1612 - binary_accuracy: 0.9467 - val_loss: 0.1600 - val_binary_accuracy: 0.9467
Epoch 137/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1559 - binary_accuracy: 0.9496 - val_loss: 0.1565 - val_binary_accuracy: 0.9479
Epoch 138/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1593 - binary_accuracy: 0.9498 - val_loss: 0.1570 - val_binary_accuracy: 0.9485
Epoch 139/200
30000/30000 [==============================] - 2s 82us/sample - loss: 0.1577 - binary_accuracy: 0.9487 - val_loss: 0.1572 - val_binary_accuracy: 0.9473
Epoch 140/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1561 - binary_accuracy: 0.9486 - val_loss: 0.1587 - val_binary_accuracy: 0.9479
Epoch 141/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1580 - binary_accuracy: 0.9485 - val_loss: 0.1562 - val_binary_accuracy: 0.9481
Epoch 142/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1581 - binary_accuracy: 0.9492 - val_loss: 0.1574 - val_binary_accuracy: 0.9477
Epoch 143/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1605 - binary_accuracy: 0.9474 - val_loss: 0.1592 - val_binary_accuracy: 0.9495
Epoch 144/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1579 - binary_accuracy: 0.9494 - val_loss: 0.1570 - val_binary_accuracy: 0.9488
Epoch 145/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1581 - binary_accuracy: 0.9493 - val_loss: 0.1579 - val_binary_accuracy: 0.9466
Epoch 146/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1576 - binary_accuracy: 0.9488 - val_loss: 0.1568 - val_binary_accuracy: 0.9477
Epoch 147/200
30000/30000 [==============================] - 2s 62us/sample - loss: 0.1586 - binary_accuracy: 0.9482 - val_loss: 0.1662 - val_binary_accuracy: 0.9469
Epoch 148/200
30000/30000 [==============================] - 2s 76us/sample - loss: 0.1556 - binary_accuracy: 0.9497 - val_loss: 0.1557 - val_binary_accuracy: 0.9487
Epoch 149/200
30000/30000 [==============================] - 2s 67us/sample - loss: 0.1565 - binary_accuracy: 0.9507 - val_loss: 0.1583 - val_binary_accuracy: 0.9493
Epoch 150/200
30000/30000 [==============================] - 2s 67us/sample - loss: 0.1552 - binary_accuracy: 0.9507 - val_loss: 0.1584 - val_binary_accuracy: 0.9481
Epoch 151/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1570 - binary_accuracy: 0.9497 - val_loss: 0.1549 - val_binary_accuracy: 0.9492
Epoch 152/200
30000/30000 [==============================] - 2s 60us/sample - loss: 0.1531 - binary_accuracy: 0.9504 - val_loss: 0.1624 - val_binary_accuracy: 0.9483
Epoch 153/200
30000/30000 [==============================] - 2s 69us/sample - loss: 0.1589 - binary_accuracy: 0.9494 - val_loss: 0.1565 - val_binary_accuracy: 0.9491
Epoch 154/200
30000/30000 [==============================] - 2s 63us/sample - loss: 0.1548 - binary_accuracy: 0.9503 - val_loss: 0.1581 - val_binary_accuracy: 0.9491
Epoch 155/200
30000/30000 [==============================] - 2s 63us/sample - loss: 0.1564 - binary_accuracy: 0.9502 - val_loss: 0.1575 - val_binary_accuracy: 0.9492
Epoch 156/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1568 - binary_accuracy: 0.9489 - val_loss: 0.1561 - val_binary_accuracy: 0.9494
Epoch 157/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1567 - binary_accuracy: 0.9492 - val_loss: 0.1560 - val_binary_accuracy: 0.9515
Epoch 158/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1556 - binary_accuracy: 0.9494 - val_loss: 0.1568 - val_binary_accuracy: 0.9489
Epoch 159/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1555 - binary_accuracy: 0.9492 - val_loss: 0.1574 - val_binary_accuracy: 0.9493
Epoch 160/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1580 - binary_accuracy: 0.9482 - val_loss: 0.1577 - val_binary_accuracy: 0.9497
Epoch 161/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1545 - binary_accuracy: 0.9496 - val_loss: 0.1565 - val_binary_accuracy: 0.9492
Epoch 162/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1549 - binary_accuracy: 0.9502 - val_loss: 0.1551 - val_binary_accuracy: 0.9499
Epoch 163/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1542 - binary_accuracy: 0.9507 - val_loss: 0.1557 - val_binary_accuracy: 0.9494
Epoch 164/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1553 - binary_accuracy: 0.9492 - val_loss: 0.1556 - val_binary_accuracy: 0.9515
Epoch 165/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1563 - binary_accuracy: 0.9497 - val_loss: 0.1559 - val_binary_accuracy: 0.9495
Epoch 166/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1540 - binary_accuracy: 0.9509 - val_loss: 0.1552 - val_binary_accuracy: 0.9502
Epoch 167/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1541 - binary_accuracy: 0.9504 - val_loss: 0.1600 - val_binary_accuracy: 0.9456
Epoch 168/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1573 - binary_accuracy: 0.9491 - val_loss: 0.1570 - val_binary_accuracy: 0.9481
Epoch 169/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1547 - binary_accuracy: 0.9503 - val_loss: 0.1566 - val_binary_accuracy: 0.9495
Epoch 170/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1569 - binary_accuracy: 0.9501 - val_loss: 0.1559 - val_binary_accuracy: 0.9508
Epoch 171/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1559 - binary_accuracy: 0.9499 - val_loss: 0.1607 - val_binary_accuracy: 0.9472
Epoch 172/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1570 - binary_accuracy: 0.9493 - val_loss: 0.1521 - val_binary_accuracy: 0.9506
Epoch 173/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1579 - binary_accuracy: 0.9486 - val_loss: 0.1563 - val_binary_accuracy: 0.9487
Epoch 174/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1552 - binary_accuracy: 0.9501 - val_loss: 0.1540 - val_binary_accuracy: 0.9486
Epoch 175/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1566 - binary_accuracy: 0.9495 - val_loss: 0.1543 - val_binary_accuracy: 0.9482
Epoch 176/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1546 - binary_accuracy: 0.9489 - val_loss: 0.1594 - val_binary_accuracy: 0.9480
Epoch 177/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1531 - binary_accuracy: 0.9501 - val_loss: 0.1550 - val_binary_accuracy: 0.9495
Epoch 178/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1557 - binary_accuracy: 0.9498 - val_loss: 0.1594 - val_binary_accuracy: 0.9472
Epoch 179/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1552 - binary_accuracy: 0.9493 - val_loss: 0.1569 - val_binary_accuracy: 0.9482
Epoch 180/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1550 - binary_accuracy: 0.9489 - val_loss: 0.1590 - val_binary_accuracy: 0.9480
Epoch 181/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1568 - binary_accuracy: 0.9493 - val_loss: 0.1572 - val_binary_accuracy: 0.9480
Epoch 182/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1524 - binary_accuracy: 0.9502 - val_loss: 0.1563 - val_binary_accuracy: 0.9489
Epoch 183/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1503 - binary_accuracy: 0.9508 - val_loss: 0.1567 - val_binary_accuracy: 0.9491
Epoch 184/200
30000/30000 [==============================] - 2s 60us/sample - loss: 0.1544 - binary_accuracy: 0.9500 - val_loss: 0.1658 - val_binary_accuracy: 0.9465
Epoch 185/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1568 - binary_accuracy: 0.9487 - val_loss: 0.1564 - val_binary_accuracy: 0.9480
Epoch 186/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1568 - binary_accuracy: 0.9483 - val_loss: 0.1597 - val_binary_accuracy: 0.9476
Epoch 187/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1501 - binary_accuracy: 0.9508 - val_loss: 0.1550 - val_binary_accuracy: 0.9495
Epoch 188/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1544 - binary_accuracy: 0.9500 - val_loss: 0.1581 - val_binary_accuracy: 0.9488
Epoch 189/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1535 - binary_accuracy: 0.9509 - val_loss: 0.1575 - val_binary_accuracy: 0.9480
Epoch 190/200
30000/30000 [==============================] - 2s 78us/sample - loss: 0.1546 - binary_accuracy: 0.9484 - val_loss: 0.1671 - val_binary_accuracy: 0.9454
Epoch 191/200
30000/30000 [==============================] - 2s 70us/sample - loss: 0.1509 - binary_accuracy: 0.9507 - val_loss: 0.1562 - val_binary_accuracy: 0.9481
Epoch 192/200
30000/30000 [==============================] - 2s 67us/sample - loss: 0.1546 - binary_accuracy: 0.9491 - val_loss: 0.1601 - val_binary_accuracy: 0.9481
Epoch 193/200
30000/30000 [==============================] - 2s 65us/sample - loss: 0.1580 - binary_accuracy: 0.9494 - val_loss: 0.1573 - val_binary_accuracy: 0.9491
Epoch 194/200
30000/30000 [==============================] - 2s 61us/sample - loss: 0.1531 - binary_accuracy: 0.9504 - val_loss: 0.1564 - val_binary_accuracy: 0.9488
Epoch 195/200
30000/30000 [==============================] - 2s 71us/sample - loss: 0.1498 - binary_accuracy: 0.9506 - val_loss: 0.1557 - val_binary_accuracy: 0.9480
Epoch 196/200
30000/30000 [==============================] - 2s 62us/sample - loss: 0.1548 - binary_accuracy: 0.9507 - val_loss: 0.1589 - val_binary_accuracy: 0.9472
Epoch 197/200
30000/30000 [==============================] - 2s 60us/sample - loss: 0.1529 - binary_accuracy: 0.9503 - val_loss: 0.1599 - val_binary_accuracy: 0.9467
Epoch 198/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1511 - binary_accuracy: 0.9507 - val_loss: 0.1582 - val_binary_accuracy: 0.9492
Epoch 199/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1536 - binary_accuracy: 0.9505 - val_loss: 0.1534 - val_binary_accuracy: 0.9501
Epoch 200/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1545 - binary_accuracy: 0.9505 - val_loss: 0.1571 - val_binary_accuracy: 0.9485
In [47]:
inputs = keras.Input(shape= (54,))
x = layers.Dense(64, activation='relu')(inputs)
x = layers.Dropout(.3)(x)
x = layers.Dense(64, activation='relu')(x)
x = layers.Dropout(.3)(x)
x = layers.Dense(64, activation='relu')(x)
x = layers.Dropout(.3)(x)
x = layers.Dense(16, activation='relu')(x)
x = layers.Dropout(.3)(x)
outputs = layers.Dense(1, activation='sigmoid')(x)

model_2 = keras.Model(inputs, outputs, name='model-2')
print(model_2.summary())
model_2.compile(keras.optimizers.Adam(), 
                loss = keras.losses.BinaryCrossentropy(),
                metrics=[ keras.metrics.BinaryAccuracy()])
# log the training, and save it 
log_dir =os.path.join('lab3-log', 'model-2')
model_cbk = keras.callbacks.TensorBoard(log_dir=log_dir)
# save the best parameters
model_mckp = keras.callbacks.ModelCheckpoint(model_dir+'/Best-model-2.h5',monitor='val_binary_accuracy',
                                             save_best_only=True, mode='max')
Model: "model-2"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
input_2 (InputLayer)         [(None, 54)]              0         
_________________________________________________________________
dense_5 (Dense)              (None, 64)                3520      
_________________________________________________________________
dropout_4 (Dropout)          (None, 64)                0         
_________________________________________________________________
dense_6 (Dense)              (None, 64)                4160      
_________________________________________________________________
dropout_5 (Dropout)          (None, 64)                0         
_________________________________________________________________
dense_7 (Dense)              (None, 64)                4160      
_________________________________________________________________
dropout_6 (Dropout)          (None, 64)                0         
_________________________________________________________________
dense_8 (Dense)              (None, 16)                1040      
_________________________________________________________________
dropout_7 (Dropout)          (None, 16)                0         
_________________________________________________________________
dense_9 (Dense)              (None, 1)                 17        
=================================================================
Total params: 12,897
Trainable params: 12,897
Non-trainable params: 0
_________________________________________________________________
None
In [48]:
history_2 = model_2.fit(xtr_one_hot, ytr, batch_size = 64, epochs=200, validation_data=(xval_one_hot, yval),
                        callbacks=[model_cbk, model_mckp])
Train on 30000 samples, validate on 10000 samples
Epoch 1/200
30000/30000 [==============================] - 3s 86us/sample - loss: 0.4560 - binary_accuracy: 0.8099 - val_loss: 0.3293 - val_binary_accuracy: 0.8980
Epoch 2/200
30000/30000 [==============================] - 2s 76us/sample - loss: 0.3419 - binary_accuracy: 0.8859 - val_loss: 0.2577 - val_binary_accuracy: 0.9189
Epoch 3/200
30000/30000 [==============================] - 2s 70us/sample - loss: 0.2849 - binary_accuracy: 0.9035 - val_loss: 0.2012 - val_binary_accuracy: 0.9251
Epoch 4/200
30000/30000 [==============================] - 2s 60us/sample - loss: 0.2488 - binary_accuracy: 0.9129 - val_loss: 0.1791 - val_binary_accuracy: 0.9318
Epoch 5/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.2254 - binary_accuracy: 0.9187 - val_loss: 0.1710 - val_binary_accuracy: 0.9321
Epoch 6/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.2097 - binary_accuracy: 0.9224 - val_loss: 0.1643 - val_binary_accuracy: 0.9334
Epoch 7/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1978 - binary_accuracy: 0.9265 - val_loss: 0.1517 - val_binary_accuracy: 0.9370
Epoch 8/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1869 - binary_accuracy: 0.9311 - val_loss: 0.1563 - val_binary_accuracy: 0.9359
Epoch 9/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1802 - binary_accuracy: 0.9327 - val_loss: 0.1479 - val_binary_accuracy: 0.9400
Epoch 10/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1722 - binary_accuracy: 0.9351 - val_loss: 0.1444 - val_binary_accuracy: 0.9442
Epoch 11/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.1660 - binary_accuracy: 0.9357 - val_loss: 0.1408 - val_binary_accuracy: 0.9435
Epoch 12/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1628 - binary_accuracy: 0.9386 - val_loss: 0.1386 - val_binary_accuracy: 0.9458
Epoch 13/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1582 - binary_accuracy: 0.9396 - val_loss: 0.1290 - val_binary_accuracy: 0.9484
Epoch 14/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1514 - binary_accuracy: 0.9416 - val_loss: 0.1260 - val_binary_accuracy: 0.9479
Epoch 15/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1501 - binary_accuracy: 0.9446 - val_loss: 0.1240 - val_binary_accuracy: 0.9503
Epoch 16/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1442 - binary_accuracy: 0.9446 - val_loss: 0.1247 - val_binary_accuracy: 0.9492
Epoch 17/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1409 - binary_accuracy: 0.9459 - val_loss: 0.1196 - val_binary_accuracy: 0.9515
Epoch 18/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1378 - binary_accuracy: 0.9482 - val_loss: 0.1169 - val_binary_accuracy: 0.9535
Epoch 19/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1347 - binary_accuracy: 0.9499 - val_loss: 0.1216 - val_binary_accuracy: 0.9528
Epoch 20/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1321 - binary_accuracy: 0.9506 - val_loss: 0.1189 - val_binary_accuracy: 0.9534
Epoch 21/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1315 - binary_accuracy: 0.9496 - val_loss: 0.1158 - val_binary_accuracy: 0.9524
Epoch 22/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1294 - binary_accuracy: 0.9527 - val_loss: 0.1122 - val_binary_accuracy: 0.9555
Epoch 23/200
30000/30000 [==============================] - 2s 60us/sample - loss: 0.1277 - binary_accuracy: 0.9514 - val_loss: 0.1210 - val_binary_accuracy: 0.9503
Epoch 24/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1213 - binary_accuracy: 0.9536 - val_loss: 0.1110 - val_binary_accuracy: 0.9545
Epoch 25/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1213 - binary_accuracy: 0.9535 - val_loss: 0.1218 - val_binary_accuracy: 0.9561
Epoch 26/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1228 - binary_accuracy: 0.9547 - val_loss: 0.1094 - val_binary_accuracy: 0.9575
Epoch 27/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1206 - binary_accuracy: 0.9533 - val_loss: 0.1082 - val_binary_accuracy: 0.9570
Epoch 28/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1188 - binary_accuracy: 0.9552 - val_loss: 0.1111 - val_binary_accuracy: 0.9563
Epoch 29/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1159 - binary_accuracy: 0.9547 - val_loss: 0.1049 - val_binary_accuracy: 0.9580
Epoch 30/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1175 - binary_accuracy: 0.9543 - val_loss: 0.1100 - val_binary_accuracy: 0.9574
Epoch 31/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1132 - binary_accuracy: 0.9561 - val_loss: 0.1125 - val_binary_accuracy: 0.9571
Epoch 32/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1119 - binary_accuracy: 0.9565 - val_loss: 0.1071 - val_binary_accuracy: 0.9573
Epoch 33/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1164 - binary_accuracy: 0.9555 - val_loss: 0.1065 - val_binary_accuracy: 0.9576
Epoch 34/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1082 - binary_accuracy: 0.9573 - val_loss: 0.1081 - val_binary_accuracy: 0.9571
Epoch 35/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.1128 - binary_accuracy: 0.9578 - val_loss: 0.1067 - val_binary_accuracy: 0.9575
Epoch 36/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1090 - binary_accuracy: 0.9599 - val_loss: 0.1049 - val_binary_accuracy: 0.9580
Epoch 37/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1108 - binary_accuracy: 0.9595 - val_loss: 0.1079 - val_binary_accuracy: 0.9571
Epoch 38/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1050 - binary_accuracy: 0.9596 - val_loss: 0.1044 - val_binary_accuracy: 0.9592
Epoch 39/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1056 - binary_accuracy: 0.9601 - val_loss: 0.1061 - val_binary_accuracy: 0.9587
Epoch 40/200
30000/30000 [==============================] - 2s 60us/sample - loss: 0.1042 - binary_accuracy: 0.9590 - val_loss: 0.1021 - val_binary_accuracy: 0.9595
Epoch 41/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1052 - binary_accuracy: 0.9584 - val_loss: 0.1008 - val_binary_accuracy: 0.9587
Epoch 42/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1035 - binary_accuracy: 0.9614 - val_loss: 0.1133 - val_binary_accuracy: 0.9579
Epoch 43/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1052 - binary_accuracy: 0.9607 - val_loss: 0.0969 - val_binary_accuracy: 0.9611
Epoch 44/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.1031 - binary_accuracy: 0.9598 - val_loss: 0.1040 - val_binary_accuracy: 0.9608
Epoch 45/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.1014 - binary_accuracy: 0.9617 - val_loss: 0.1038 - val_binary_accuracy: 0.9594
Epoch 46/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1027 - binary_accuracy: 0.9610 - val_loss: 0.1018 - val_binary_accuracy: 0.9596
Epoch 47/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.0997 - binary_accuracy: 0.9620 - val_loss: 0.0992 - val_binary_accuracy: 0.9598
Epoch 48/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.1069 - binary_accuracy: 0.9602 - val_loss: 0.0994 - val_binary_accuracy: 0.9612
Epoch 49/200
30000/30000 [==============================] - 2s 61us/sample - loss: 0.0966 - binary_accuracy: 0.9631 - val_loss: 0.1014 - val_binary_accuracy: 0.9615
Epoch 50/200
30000/30000 [==============================] - 2s 53us/sample - loss: 0.1015 - binary_accuracy: 0.9622 - val_loss: 0.1072 - val_binary_accuracy: 0.9600
Epoch 51/200
30000/30000 [==============================] - 2s 53us/sample - loss: 0.0952 - binary_accuracy: 0.9622 - val_loss: 0.1064 - val_binary_accuracy: 0.9593
Epoch 52/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.1031 - binary_accuracy: 0.9627 - val_loss: 0.1013 - val_binary_accuracy: 0.9594
Epoch 53/200
30000/30000 [==============================] - 2s 61us/sample - loss: 0.0965 - binary_accuracy: 0.9642 - val_loss: 0.1034 - val_binary_accuracy: 0.9588
Epoch 54/200
30000/30000 [==============================] - 2s 61us/sample - loss: 0.1007 - binary_accuracy: 0.9605 - val_loss: 0.0994 - val_binary_accuracy: 0.9609
Epoch 55/200
30000/30000 [==============================] - 2s 74us/sample - loss: 0.0980 - binary_accuracy: 0.9612 - val_loss: 0.0984 - val_binary_accuracy: 0.9597
Epoch 56/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.1009 - binary_accuracy: 0.9622 - val_loss: 0.0988 - val_binary_accuracy: 0.9588
Epoch 57/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0946 - binary_accuracy: 0.9630 - val_loss: 0.0983 - val_binary_accuracy: 0.9603
Epoch 58/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0969 - binary_accuracy: 0.9645 - val_loss: 0.1040 - val_binary_accuracy: 0.9621
Epoch 59/200
30000/30000 [==============================] - 2s 53us/sample - loss: 0.0945 - binary_accuracy: 0.9636 - val_loss: 0.1109 - val_binary_accuracy: 0.9591
Epoch 60/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0960 - binary_accuracy: 0.9639 - val_loss: 0.1001 - val_binary_accuracy: 0.9633
Epoch 61/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.0955 - binary_accuracy: 0.9646 - val_loss: 0.1025 - val_binary_accuracy: 0.9616
Epoch 62/200
30000/30000 [==============================] - 2s 61us/sample - loss: 0.0919 - binary_accuracy: 0.9646 - val_loss: 0.1004 - val_binary_accuracy: 0.9604
Epoch 63/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0938 - binary_accuracy: 0.9639 - val_loss: 0.1069 - val_binary_accuracy: 0.9619
Epoch 64/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0944 - binary_accuracy: 0.9632 - val_loss: 0.1060 - val_binary_accuracy: 0.9628
Epoch 65/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0924 - binary_accuracy: 0.9630 - val_loss: 0.1012 - val_binary_accuracy: 0.9622
Epoch 66/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.0937 - binary_accuracy: 0.9634 - val_loss: 0.1019 - val_binary_accuracy: 0.9640
Epoch 67/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.0913 - binary_accuracy: 0.9657 - val_loss: 0.1030 - val_binary_accuracy: 0.9593
Epoch 68/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0918 - binary_accuracy: 0.9652 - val_loss: 0.0971 - val_binary_accuracy: 0.9620
Epoch 69/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0951 - binary_accuracy: 0.9652 - val_loss: 0.0926 - val_binary_accuracy: 0.9625
Epoch 70/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0945 - binary_accuracy: 0.9641 - val_loss: 0.0967 - val_binary_accuracy: 0.9625
Epoch 71/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0922 - binary_accuracy: 0.9657 - val_loss: 0.1045 - val_binary_accuracy: 0.9629
Epoch 72/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.0906 - binary_accuracy: 0.9657 - val_loss: 0.0994 - val_binary_accuracy: 0.9629
Epoch 73/200
30000/30000 [==============================] - 2s 70us/sample - loss: 0.0909 - binary_accuracy: 0.9658 - val_loss: 0.0949 - val_binary_accuracy: 0.9650
Epoch 74/200
30000/30000 [==============================] - 2s 67us/sample - loss: 0.0909 - binary_accuracy: 0.9656 - val_loss: 0.0993 - val_binary_accuracy: 0.9630
Epoch 75/200
30000/30000 [==============================] - 2s 78us/sample - loss: 0.0910 - binary_accuracy: 0.9657 - val_loss: 0.1021 - val_binary_accuracy: 0.9596
Epoch 76/200
30000/30000 [==============================] - 2s 60us/sample - loss: 0.0893 - binary_accuracy: 0.9664 - val_loss: 0.0982 - val_binary_accuracy: 0.9623
Epoch 77/200
30000/30000 [==============================] - 2s 61us/sample - loss: 0.0893 - binary_accuracy: 0.9673 - val_loss: 0.0929 - val_binary_accuracy: 0.9634
Epoch 78/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.0888 - binary_accuracy: 0.9661 - val_loss: 0.0967 - val_binary_accuracy: 0.9617
Epoch 79/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.0881 - binary_accuracy: 0.9664 - val_loss: 0.0979 - val_binary_accuracy: 0.9626
Epoch 80/200
30000/30000 [==============================] - 2s 63us/sample - loss: 0.0909 - binary_accuracy: 0.9669 - val_loss: 0.0969 - val_binary_accuracy: 0.9614
Epoch 81/200
30000/30000 [==============================] - 2s 62us/sample - loss: 0.0897 - binary_accuracy: 0.9654 - val_loss: 0.0979 - val_binary_accuracy: 0.9643
Epoch 82/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.0884 - binary_accuracy: 0.9652 - val_loss: 0.0978 - val_binary_accuracy: 0.9624
Epoch 83/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.0858 - binary_accuracy: 0.9670 - val_loss: 0.1006 - val_binary_accuracy: 0.9627
Epoch 84/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.0865 - binary_accuracy: 0.9673 - val_loss: 0.0952 - val_binary_accuracy: 0.9627
Epoch 85/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.0834 - binary_accuracy: 0.9681 - val_loss: 0.1017 - val_binary_accuracy: 0.9649
Epoch 86/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.0914 - binary_accuracy: 0.9661 - val_loss: 0.0977 - val_binary_accuracy: 0.9638
Epoch 87/200
30000/30000 [==============================] - 2s 60us/sample - loss: 0.0849 - binary_accuracy: 0.9683 - val_loss: 0.1028 - val_binary_accuracy: 0.9621
Epoch 88/200
30000/30000 [==============================] - 2s 60us/sample - loss: 0.0893 - binary_accuracy: 0.9657 - val_loss: 0.0975 - val_binary_accuracy: 0.9640
Epoch 89/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.0871 - binary_accuracy: 0.9676 - val_loss: 0.0951 - val_binary_accuracy: 0.9626
Epoch 90/200
30000/30000 [==============================] - 2s 62us/sample - loss: 0.0863 - binary_accuracy: 0.9686 - val_loss: 0.1016 - val_binary_accuracy: 0.9657
Epoch 91/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.0875 - binary_accuracy: 0.9686 - val_loss: 0.0987 - val_binary_accuracy: 0.9621
Epoch 92/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.0843 - binary_accuracy: 0.9677 - val_loss: 0.1035 - val_binary_accuracy: 0.9637
Epoch 93/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.0866 - binary_accuracy: 0.9675 - val_loss: 0.0983 - val_binary_accuracy: 0.9630
Epoch 94/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.0896 - binary_accuracy: 0.9654 - val_loss: 0.0929 - val_binary_accuracy: 0.9667
Epoch 95/200
30000/30000 [==============================] - 2s 59us/sample - loss: 0.0837 - binary_accuracy: 0.9682 - val_loss: 0.0966 - val_binary_accuracy: 0.9648
Epoch 96/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.0890 - binary_accuracy: 0.9669 - val_loss: 0.0960 - val_binary_accuracy: 0.9651
Epoch 97/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.0845 - binary_accuracy: 0.9684 - val_loss: 0.1045 - val_binary_accuracy: 0.9638
Epoch 98/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.0841 - binary_accuracy: 0.9685 - val_loss: 0.0990 - val_binary_accuracy: 0.9631
Epoch 99/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.0841 - binary_accuracy: 0.9685 - val_loss: 0.0915 - val_binary_accuracy: 0.9664
Epoch 100/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0881 - binary_accuracy: 0.9668 - val_loss: 0.0966 - val_binary_accuracy: 0.9639
Epoch 101/200
30000/30000 [==============================] - 2s 53us/sample - loss: 0.0838 - binary_accuracy: 0.9688 - val_loss: 0.1000 - val_binary_accuracy: 0.9655
Epoch 102/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0828 - binary_accuracy: 0.9703 - val_loss: 0.1102 - val_binary_accuracy: 0.9607
Epoch 103/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0851 - binary_accuracy: 0.9678 - val_loss: 0.0980 - val_binary_accuracy: 0.9635
Epoch 104/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0830 - binary_accuracy: 0.9692 - val_loss: 0.0956 - val_binary_accuracy: 0.9641
Epoch 105/200
30000/30000 [==============================] - 2s 53us/sample - loss: 0.0820 - binary_accuracy: 0.9701 - val_loss: 0.0944 - val_binary_accuracy: 0.9635
Epoch 106/200
30000/30000 [==============================] - 2s 53us/sample - loss: 0.0838 - binary_accuracy: 0.9691 - val_loss: 0.0993 - val_binary_accuracy: 0.9643
Epoch 107/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0826 - binary_accuracy: 0.9687 - val_loss: 0.0951 - val_binary_accuracy: 0.9627
Epoch 108/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0834 - binary_accuracy: 0.9695 - val_loss: 0.0998 - val_binary_accuracy: 0.9653
Epoch 109/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0828 - binary_accuracy: 0.9706 - val_loss: 0.0978 - val_binary_accuracy: 0.9629
Epoch 110/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0815 - binary_accuracy: 0.9693 - val_loss: 0.0988 - val_binary_accuracy: 0.9633
Epoch 111/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0852 - binary_accuracy: 0.9687 - val_loss: 0.0992 - val_binary_accuracy: 0.9645
Epoch 112/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0819 - binary_accuracy: 0.9685 - val_loss: 0.1025 - val_binary_accuracy: 0.9643
Epoch 113/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0863 - binary_accuracy: 0.9677 - val_loss: 0.1042 - val_binary_accuracy: 0.9644
Epoch 114/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0822 - binary_accuracy: 0.9700 - val_loss: 0.0979 - val_binary_accuracy: 0.9654
Epoch 115/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0805 - binary_accuracy: 0.9698 - val_loss: 0.1090 - val_binary_accuracy: 0.9621
Epoch 116/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0839 - binary_accuracy: 0.9680 - val_loss: 0.0983 - val_binary_accuracy: 0.9646
Epoch 117/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0833 - binary_accuracy: 0.9687 - val_loss: 0.0985 - val_binary_accuracy: 0.9652
Epoch 118/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0784 - binary_accuracy: 0.9702 - val_loss: 0.1082 - val_binary_accuracy: 0.9622
Epoch 119/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0823 - binary_accuracy: 0.9701 - val_loss: 0.0971 - val_binary_accuracy: 0.9640
Epoch 120/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0807 - binary_accuracy: 0.9700 - val_loss: 0.1043 - val_binary_accuracy: 0.9629
Epoch 121/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0815 - binary_accuracy: 0.9694 - val_loss: 0.1010 - val_binary_accuracy: 0.9648
Epoch 122/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0786 - binary_accuracy: 0.9705 - val_loss: 0.0973 - val_binary_accuracy: 0.9641
Epoch 123/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0767 - binary_accuracy: 0.9707 - val_loss: 0.1081 - val_binary_accuracy: 0.9635
Epoch 124/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0843 - binary_accuracy: 0.9691 - val_loss: 0.1063 - val_binary_accuracy: 0.9638
Epoch 125/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0791 - binary_accuracy: 0.9702 - val_loss: 0.1048 - val_binary_accuracy: 0.9627
Epoch 126/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0791 - binary_accuracy: 0.9709 - val_loss: 0.1016 - val_binary_accuracy: 0.9638
Epoch 127/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0812 - binary_accuracy: 0.9697 - val_loss: 0.1050 - val_binary_accuracy: 0.9642
Epoch 128/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0803 - binary_accuracy: 0.9711 - val_loss: 0.1022 - val_binary_accuracy: 0.9637
Epoch 129/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0784 - binary_accuracy: 0.9704 - val_loss: 0.1025 - val_binary_accuracy: 0.9663
Epoch 130/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0780 - binary_accuracy: 0.9714 - val_loss: 0.1064 - val_binary_accuracy: 0.9646
Epoch 131/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0799 - binary_accuracy: 0.9708 - val_loss: 0.1044 - val_binary_accuracy: 0.9637
Epoch 132/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0820 - binary_accuracy: 0.9699 - val_loss: 0.1019 - val_binary_accuracy: 0.9647
Epoch 133/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0806 - binary_accuracy: 0.9706 - val_loss: 0.1031 - val_binary_accuracy: 0.9633
Epoch 134/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.0796 - binary_accuracy: 0.9701 - val_loss: 0.1074 - val_binary_accuracy: 0.9641
Epoch 135/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0780 - binary_accuracy: 0.9705 - val_loss: 0.1062 - val_binary_accuracy: 0.9632
Epoch 136/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0795 - binary_accuracy: 0.9716 - val_loss: 0.0950 - val_binary_accuracy: 0.9652
Epoch 137/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0771 - binary_accuracy: 0.9716 - val_loss: 0.0970 - val_binary_accuracy: 0.9634
Epoch 138/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0780 - binary_accuracy: 0.9707 - val_loss: 0.1014 - val_binary_accuracy: 0.9654
Epoch 139/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0749 - binary_accuracy: 0.9721 - val_loss: 0.0996 - val_binary_accuracy: 0.9650
Epoch 140/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0781 - binary_accuracy: 0.9707 - val_loss: 0.1025 - val_binary_accuracy: 0.9658
Epoch 141/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0766 - binary_accuracy: 0.9714 - val_loss: 0.1138 - val_binary_accuracy: 0.9622
Epoch 142/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0791 - binary_accuracy: 0.9711 - val_loss: 0.0992 - val_binary_accuracy: 0.9653
Epoch 143/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0769 - binary_accuracy: 0.9706 - val_loss: 0.1018 - val_binary_accuracy: 0.9648
Epoch 144/200
30000/30000 [==============================] - 2s 58us/sample - loss: 0.0760 - binary_accuracy: 0.9714 - val_loss: 0.1048 - val_binary_accuracy: 0.9632
Epoch 145/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0786 - binary_accuracy: 0.9704 - val_loss: 0.1089 - val_binary_accuracy: 0.9657
Epoch 146/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.0762 - binary_accuracy: 0.9713 - val_loss: 0.0973 - val_binary_accuracy: 0.9670
Epoch 147/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0730 - binary_accuracy: 0.9734 - val_loss: 0.1029 - val_binary_accuracy: 0.9646
Epoch 148/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0752 - binary_accuracy: 0.9712 - val_loss: 0.1099 - val_binary_accuracy: 0.9648
Epoch 149/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0781 - binary_accuracy: 0.9718 - val_loss: 0.1101 - val_binary_accuracy: 0.9637
Epoch 150/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0783 - binary_accuracy: 0.9712 - val_loss: 0.1071 - val_binary_accuracy: 0.9630
Epoch 151/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0772 - binary_accuracy: 0.9706 - val_loss: 0.1056 - val_binary_accuracy: 0.9657
Epoch 152/200
30000/30000 [==============================] - 2s 53us/sample - loss: 0.0744 - binary_accuracy: 0.9717 - val_loss: 0.1050 - val_binary_accuracy: 0.9660
Epoch 153/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0757 - binary_accuracy: 0.9717 - val_loss: 0.1002 - val_binary_accuracy: 0.9664
Epoch 154/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0760 - binary_accuracy: 0.9713 - val_loss: 0.1060 - val_binary_accuracy: 0.9647
Epoch 155/200
30000/30000 [==============================] - 2s 53us/sample - loss: 0.0769 - binary_accuracy: 0.9719 - val_loss: 0.1054 - val_binary_accuracy: 0.9653
Epoch 156/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0744 - binary_accuracy: 0.9719 - val_loss: 0.1068 - val_binary_accuracy: 0.9648
Epoch 157/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0762 - binary_accuracy: 0.9728 - val_loss: 0.0977 - val_binary_accuracy: 0.9663
Epoch 158/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0762 - binary_accuracy: 0.9719 - val_loss: 0.1063 - val_binary_accuracy: 0.9660
Epoch 159/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0755 - binary_accuracy: 0.9724 - val_loss: 0.1028 - val_binary_accuracy: 0.9644
Epoch 160/200
30000/30000 [==============================] - 2s 53us/sample - loss: 0.0714 - binary_accuracy: 0.9734 - val_loss: 0.1217 - val_binary_accuracy: 0.9632
Epoch 161/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0763 - binary_accuracy: 0.9715 - val_loss: 0.1046 - val_binary_accuracy: 0.9639
Epoch 162/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0783 - binary_accuracy: 0.9719 - val_loss: 0.0997 - val_binary_accuracy: 0.9652
Epoch 163/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0756 - binary_accuracy: 0.9716 - val_loss: 0.1016 - val_binary_accuracy: 0.9655
Epoch 164/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0734 - binary_accuracy: 0.9730 - val_loss: 0.1125 - val_binary_accuracy: 0.9657
Epoch 165/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0745 - binary_accuracy: 0.9731 - val_loss: 0.1016 - val_binary_accuracy: 0.9668
Epoch 166/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0749 - binary_accuracy: 0.9723 - val_loss: 0.1073 - val_binary_accuracy: 0.9659
Epoch 167/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0740 - binary_accuracy: 0.9722 - val_loss: 0.0961 - val_binary_accuracy: 0.9678
Epoch 168/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0736 - binary_accuracy: 0.9732 - val_loss: 0.1128 - val_binary_accuracy: 0.9640
Epoch 169/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0735 - binary_accuracy: 0.9726 - val_loss: 0.1054 - val_binary_accuracy: 0.9629
Epoch 170/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0739 - binary_accuracy: 0.9734 - val_loss: 0.1057 - val_binary_accuracy: 0.9649
Epoch 171/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0721 - binary_accuracy: 0.9726 - val_loss: 0.1104 - val_binary_accuracy: 0.9652
Epoch 172/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0753 - binary_accuracy: 0.9724 - val_loss: 0.1014 - val_binary_accuracy: 0.9650
Epoch 173/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0748 - binary_accuracy: 0.9728 - val_loss: 0.1114 - val_binary_accuracy: 0.9662
Epoch 174/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0740 - binary_accuracy: 0.9739 - val_loss: 0.1008 - val_binary_accuracy: 0.9654
Epoch 175/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0727 - binary_accuracy: 0.9725 - val_loss: 0.1070 - val_binary_accuracy: 0.9659
Epoch 176/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0748 - binary_accuracy: 0.9731 - val_loss: 0.1038 - val_binary_accuracy: 0.9648
Epoch 177/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0736 - binary_accuracy: 0.9737 - val_loss: 0.1050 - val_binary_accuracy: 0.9650
Epoch 178/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0743 - binary_accuracy: 0.9728 - val_loss: 0.1099 - val_binary_accuracy: 0.9653
Epoch 179/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0731 - binary_accuracy: 0.9734 - val_loss: 0.1051 - val_binary_accuracy: 0.9648
Epoch 180/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0731 - binary_accuracy: 0.9725 - val_loss: 0.1071 - val_binary_accuracy: 0.9650
Epoch 181/200
30000/30000 [==============================] - 2s 57us/sample - loss: 0.0690 - binary_accuracy: 0.9743 - val_loss: 0.1102 - val_binary_accuracy: 0.9658
Epoch 182/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0714 - binary_accuracy: 0.9726 - val_loss: 0.1143 - val_binary_accuracy: 0.9651
Epoch 183/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0742 - binary_accuracy: 0.9728 - val_loss: 0.1027 - val_binary_accuracy: 0.9658
Epoch 184/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0736 - binary_accuracy: 0.9730 - val_loss: 0.1039 - val_binary_accuracy: 0.9637
Epoch 185/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0730 - binary_accuracy: 0.9726 - val_loss: 0.1064 - val_binary_accuracy: 0.9649
Epoch 186/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0744 - binary_accuracy: 0.9725 - val_loss: 0.1032 - val_binary_accuracy: 0.9660
Epoch 187/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0712 - binary_accuracy: 0.9739 - val_loss: 0.1017 - val_binary_accuracy: 0.9647
Epoch 188/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0739 - binary_accuracy: 0.9728 - val_loss: 0.1082 - val_binary_accuracy: 0.9644
Epoch 189/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0737 - binary_accuracy: 0.9729 - val_loss: 0.1014 - val_binary_accuracy: 0.9639
Epoch 190/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0714 - binary_accuracy: 0.9732 - val_loss: 0.1066 - val_binary_accuracy: 0.9659
Epoch 191/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0728 - binary_accuracy: 0.9744 - val_loss: 0.1035 - val_binary_accuracy: 0.9641
Epoch 192/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0728 - binary_accuracy: 0.9735 - val_loss: 0.1043 - val_binary_accuracy: 0.9669
Epoch 193/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0688 - binary_accuracy: 0.9749 - val_loss: 0.1057 - val_binary_accuracy: 0.9664
Epoch 194/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0761 - binary_accuracy: 0.9723 - val_loss: 0.1044 - val_binary_accuracy: 0.9658
Epoch 195/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0700 - binary_accuracy: 0.9733 - val_loss: 0.1122 - val_binary_accuracy: 0.9628
Epoch 196/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0729 - binary_accuracy: 0.9733 - val_loss: 0.1069 - val_binary_accuracy: 0.9666
Epoch 197/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0713 - binary_accuracy: 0.9732 - val_loss: 0.1084 - val_binary_accuracy: 0.9649
Epoch 198/200
30000/30000 [==============================] - 2s 54us/sample - loss: 0.0709 - binary_accuracy: 0.9740 - val_loss: 0.1105 - val_binary_accuracy: 0.9666
Epoch 199/200
30000/30000 [==============================] - 2s 56us/sample - loss: 0.0688 - binary_accuracy: 0.9749 - val_loss: 0.1160 - val_binary_accuracy: 0.9670
Epoch 200/200
30000/30000 [==============================] - 2s 55us/sample - loss: 0.0720 - binary_accuracy: 0.9736 - val_loss: 0.1032 - val_binary_accuracy: 0.9657
In [49]:
plt.plot(history_1.history['binary_accuracy'], label = 'model-1-tr')
plt.plot(history_1.history['val_binary_accuracy'], label = 'model-1-val')
plt.plot(history_2.history['binary_accuracy'], label = 'model-2-tr')
plt.plot(history_2.history['val_binary_accuracy'], label = 'model-2-val')
plt.xlabel('epochs')
plt.ylabel('accuracy')
plt.legend()
Out[49]:
<matplotlib.legend.Legend at 0x7ff63c8a1610>
In [ ]:
 

沒有留言:

張貼留言