In [1]:
%matplotlib inline
In [49]:
import pandas as pd
import numpy as np
import seaborn as sns
import math
import matplotlib.pyplot as plt
from keras import metrics
from keras.layers import Dense, Activation, Conv1D, Convolution1D, Flatten
from keras.models import Model, Sequential
from keras import initializations
f(x)=0.2+0.4x2+0.3xsin(15x)+0.05cos(50x)
In [3]:
## Define our weird function for this excercise
def weird_function(x):
"""
Returns the y value for the given x using the following formula
f(x)=0.2+0.4x^2+0.3xsin(15x)+0.05cos(50x)
"""
y = 0.2+0.4*math.pow(x,2)+0.3*x*math.sin(15*x)+0.05*math.cos(50*x)
return y
In [142]:
import matplotlib.ticker as ticker
size = 100
## Plot our weird function
x = np.linspace(0., 1., size)
df = pd.DataFrame({'x_definition':x})
df['y_definition'] = df['x_definition'].apply(lambda x: weird_function(x))
g = sns.FacetGrid(df, size=4, aspect=1.5)
g.map(plt.plot, "x_definition", "y_definition")
Out[142]:
<seaborn.axisgrid.FacetGrid at 0x7f45835c4a50>
In [143]:
## Set the mean, standard deviation, and size of the dataset, respectively
mu, sigma = 0, 0.01
## Create a uniformally distributed set of X values between 0 and 1 and store in pandas dataframe
x = np.random.uniform(0,1, size)
df['x'] = x
## Find the "perfect" y value corresponding to each x value given
df['y_perfect'] = df['x'].apply(lambda x: weird_function(x))
## Create some noise and add it to each "perfect" y value to create a realistic y dataset
df['noise'] = np.random.normal(mu, sigma, size=(size,))
df['y'] = df['y_perfect']+df['noise']
g = sns.FacetGrid(df, size=4, aspect=1.5)
g.map(plt.plot, "x_definition", "y_definition")
g.map(plt.scatter, "x", "y_perfect", color='blue')
g.map(plt.scatter, "x", "y", color='green')
Out[143]:
<seaborn.axisgrid.FacetGrid at 0x7f4580102910>
In [87]:
## Create our model with a single dense layer, with a linear activation function and glorot (Xavier) input normalization
model = Sequential([
Dense(1000, activation='relu', input_dim=1, init='uniform'),
#Convolution1D(64, 5, activation='relu', batch_input_shape=(32, 1, size)),
Dense(100, activation='relu', init='uniform'),
Dense(10, activation='relu', init='uniform'),
Dense(output_dim=1, activation='linear')
])
## Compile our model using the method of least squares (mse) loss function
## and a stochastic gradient descent (sgd) optimizer
model.compile(loss='mse', optimizer='Adam')
## Set our learning rate to 0.01 and print it
model.optimizer.lr.set_value(.01)
history = model.fit(x=df['x'], y=df['y'], validation_split=0.2, batch_size=32, nb_epoch=500)
Train on 81 samples, validate on 21 samples
Epoch 1/500
81/81 [==============================] - 0s - loss: 0.1251 - val_loss: 0.0485
Epoch 2/500
81/81 [==============================] - 0s - loss: 0.0342 - val_loss: 0.0511
Epoch 3/500
81/81 [==============================] - 0s - loss: 0.0292 - val_loss: 0.0359
Epoch 4/500
81/81 [==============================] - 0s - loss: 0.0241 - val_loss: 0.0327
Epoch 5/500
81/81 [==============================] - 0s - loss: 0.0215 - val_loss: 0.0338
Epoch 6/500
81/81 [==============================] - 0s - loss: 0.0202 - val_loss: 0.0283
Epoch 7/500
81/81 [==============================] - 0s - loss: 0.0193 - val_loss: 0.0279
Epoch 8/500
81/81 [==============================] - 0s - loss: 0.0191 - val_loss: 0.0272
Epoch 9/500
81/81 [==============================] - 0s - loss: 0.0192 - val_loss: 0.0257
Epoch 10/500
81/81 [==============================] - 0s - loss: 0.0203 - val_loss: 0.0242
Epoch 11/500
81/81 [==============================] - 0s - loss: 0.0173 - val_loss: 0.0221
Epoch 12/500
81/81 [==============================] - 0s - loss: 0.0165 - val_loss: 0.0218
Epoch 13/500
81/81 [==============================] - 0s - loss: 0.0164 - val_loss: 0.0206
Epoch 14/500
81/81 [==============================] - 0s - loss: 0.0158 - val_loss: 0.0197
Epoch 15/500
81/81 [==============================] - 0s - loss: 0.0165 - val_loss: 0.0193
Epoch 16/500
81/81 [==============================] - 0s - loss: 0.0151 - val_loss: 0.0179
Epoch 17/500
81/81 [==============================] - 0s - loss: 0.0157 - val_loss: 0.0175
Epoch 18/500
81/81 [==============================] - 0s - loss: 0.0140 - val_loss: 0.0166
Epoch 19/500
81/81 [==============================] - 0s - loss: 0.0134 - val_loss: 0.0205
Epoch 20/500
81/81 [==============================] - 0s - loss: 0.0164 - val_loss: 0.0181
Epoch 21/500
81/81 [==============================] - 0s - loss: 0.0159 - val_loss: 0.0199
Epoch 22/500
81/81 [==============================] - 0s - loss: 0.0144 - val_loss: 0.0146
Epoch 23/500
81/81 [==============================] - 0s - loss: 0.0121 - val_loss: 0.0168
Epoch 24/500
81/81 [==============================] - 0s - loss: 0.0117 - val_loss: 0.0170
Epoch 25/500
81/81 [==============================] - 0s - loss: 0.0140 - val_loss: 0.0187
Epoch 26/500
81/81 [==============================] - 0s - loss: 0.0127 - val_loss: 0.0173
Epoch 27/500
81/81 [==============================] - 0s - loss: 0.0157 - val_loss: 0.0228
Epoch 28/500
81/81 [==============================] - 0s - loss: 0.0147 - val_loss: 0.0189
Epoch 29/500
81/81 [==============================] - 0s - loss: 0.0139 - val_loss: 0.0145
Epoch 30/500
81/81 [==============================] - 0s - loss: 0.0119 - val_loss: 0.0130
Epoch 31/500
81/81 [==============================] - 0s - loss: 0.0129 - val_loss: 0.0126
Epoch 32/500
81/81 [==============================] - 0s - loss: 0.0115 - val_loss: 0.0102
Epoch 33/500
81/81 [==============================] - 0s - loss: 0.0121 - val_loss: 0.0112
Epoch 34/500
81/81 [==============================] - 0s - loss: 0.0101 - val_loss: 0.0097
Epoch 35/500
81/81 [==============================] - 0s - loss: 0.0094 - val_loss: 0.0090
Epoch 36/500
81/81 [==============================] - 0s - loss: 0.0101 - val_loss: 0.0117
Epoch 37/500
81/81 [==============================] - 0s - loss: 0.0099 - val_loss: 0.0113
Epoch 38/500
81/81 [==============================] - 0s - loss: 0.0122 - val_loss: 0.0167
Epoch 39/500
81/81 [==============================] - 0s - loss: 0.0121 - val_loss: 0.0114
Epoch 40/500
81/81 [==============================] - 0s - loss: 0.0105 - val_loss: 0.0130
Epoch 41/500
81/81 [==============================] - 0s - loss: 0.0103 - val_loss: 0.0115
Epoch 42/500
81/81 [==============================] - 0s - loss: 0.0102 - val_loss: 0.0101
Epoch 43/500
81/81 [==============================] - 0s - loss: 0.0089 - val_loss: 0.0076
Epoch 44/500
81/81 [==============================] - 0s - loss: 0.0077 - val_loss: 0.0085
Epoch 45/500
81/81 [==============================] - 0s - loss: 0.0077 - val_loss: 0.0088
Epoch 46/500
81/81 [==============================] - 0s - loss: 0.0076 - val_loss: 0.0105
Epoch 47/500
81/81 [==============================] - 0s - loss: 0.0073 - val_loss: 0.0073
Epoch 48/500
81/81 [==============================] - 0s - loss: 0.0074 - val_loss: 0.0100
Epoch 49/500
81/81 [==============================] - 0s - loss: 0.0079 - val_loss: 0.0081
Epoch 50/500
81/81 [==============================] - 0s - loss: 0.0078 - val_loss: 0.0131
Epoch 51/500
81/81 [==============================] - 0s - loss: 0.0087 - val_loss: 0.0109
Epoch 52/500
81/81 [==============================] - 0s - loss: 0.0095 - val_loss: 0.0120
Epoch 53/500
81/81 [==============================] - 0s - loss: 0.0094 - val_loss: 0.0079
Epoch 54/500
81/81 [==============================] - 0s - loss: 0.0069 - val_loss: 0.0101
Epoch 55/500
81/81 [==============================] - 0s - loss: 0.0079 - val_loss: 0.0067
Epoch 56/500
81/81 [==============================] - 0s - loss: 0.0060 - val_loss: 0.0112
Epoch 57/500
81/81 [==============================] - 0s - loss: 0.0072 - val_loss: 0.0140
Epoch 58/500
81/81 [==============================] - 0s - loss: 0.0119 - val_loss: 0.0110
Epoch 59/500
81/81 [==============================] - 0s - loss: 0.0095 - val_loss: 0.0085
Epoch 60/500
81/81 [==============================] - 0s - loss: 0.0068 - val_loss: 0.0089
Epoch 61/500
81/81 [==============================] - 0s - loss: 0.0075 - val_loss: 0.0060
Epoch 62/500
81/81 [==============================] - 0s - loss: 0.0064 - val_loss: 0.0065
Epoch 63/500
81/81 [==============================] - 0s - loss: 0.0066 - val_loss: 0.0063
Epoch 64/500
81/81 [==============================] - 0s - loss: 0.0059 - val_loss: 0.0074
Epoch 65/500
81/81 [==============================] - 0s - loss: 0.0064 - val_loss: 0.0076
Epoch 66/500
81/81 [==============================] - 0s - loss: 0.0068 - val_loss: 0.0067
Epoch 67/500
81/81 [==============================] - 0s - loss: 0.0065 - val_loss: 0.0095
Epoch 68/500
81/81 [==============================] - 0s - loss: 0.0066 - val_loss: 0.0048
Epoch 69/500
81/81 [==============================] - 0s - loss: 0.0071 - val_loss: 0.0069
Epoch 70/500
81/81 [==============================] - 0s - loss: 0.0079 - val_loss: 0.0046
Epoch 71/500
81/81 [==============================] - 0s - loss: 0.0056 - val_loss: 0.0078
Epoch 72/500
81/81 [==============================] - 0s - loss: 0.0060 - val_loss: 0.0044
Epoch 73/500
81/81 [==============================] - 0s - loss: 0.0052 - val_loss: 0.0074
Epoch 74/500
81/81 [==============================] - 0s - loss: 0.0058 - val_loss: 0.0050
Epoch 75/500
81/81 [==============================] - 0s - loss: 0.0046 - val_loss: 0.0044
Epoch 76/500
81/81 [==============================] - 0s - loss: 0.0067 - val_loss: 0.0059
Epoch 77/500
81/81 [==============================] - 0s - loss: 0.0066 - val_loss: 0.0043
Epoch 78/500
81/81 [==============================] - 0s - loss: 0.0057 - val_loss: 0.0048
Epoch 79/500
81/81 [==============================] - 0s - loss: 0.0045 - val_loss: 0.0053
Epoch 80/500
81/81 [==============================] - 0s - loss: 0.0047 - val_loss: 0.0035
Epoch 81/500
81/81 [==============================] - 0s - loss: 0.0043 - val_loss: 0.0040
Epoch 82/500
81/81 [==============================] - 0s - loss: 0.0044 - val_loss: 0.0045
Epoch 83/500
81/81 [==============================] - 0s - loss: 0.0040 - val_loss: 0.0033
Epoch 84/500
81/81 [==============================] - 0s - loss: 0.0045 - val_loss: 0.0035
Epoch 85/500
81/81 [==============================] - 0s - loss: 0.0037 - val_loss: 0.0048
Epoch 86/500
81/81 [==============================] - 0s - loss: 0.0039 - val_loss: 0.0055
Epoch 87/500
81/81 [==============================] - 0s - loss: 0.0061 - val_loss: 0.0039
Epoch 88/500
81/81 [==============================] - 0s - loss: 0.0045 - val_loss: 0.0060
Epoch 89/500
81/81 [==============================] - 0s - loss: 0.0057 - val_loss: 0.0064
Epoch 90/500
81/81 [==============================] - 0s - loss: 0.0073 - val_loss: 0.0053
Epoch 91/500
81/81 [==============================] - 0s - loss: 0.0075 - val_loss: 0.0093
Epoch 92/500
81/81 [==============================] - 0s - loss: 0.0074 - val_loss: 0.0069
Epoch 93/500
81/81 [==============================] - 0s - loss: 0.0067 - val_loss: 0.0104
Epoch 94/500
81/81 [==============================] - 0s - loss: 0.0098 - val_loss: 0.0093
Epoch 95/500
81/81 [==============================] - 0s - loss: 0.0108 - val_loss: 0.0099
Epoch 96/500
81/81 [==============================] - 0s - loss: 0.0113 - val_loss: 0.0042
Epoch 97/500
81/81 [==============================] - 0s - loss: 0.0053 - val_loss: 0.0046
Epoch 98/500
81/81 [==============================] - 0s - loss: 0.0048 - val_loss: 0.0044
Epoch 99/500
81/81 [==============================] - 0s - loss: 0.0049 - val_loss: 0.0045
Epoch 100/500
81/81 [==============================] - 0s - loss: 0.0047 - val_loss: 0.0045
Epoch 101/500
81/81 [==============================] - 0s - loss: 0.0047 - val_loss: 0.0054
Epoch 102/500
81/81 [==============================] - 0s - loss: 0.0036 - val_loss: 0.0037
Epoch 103/500
81/81 [==============================] - 0s - loss: 0.0039 - val_loss: 0.0029
Epoch 104/500
81/81 [==============================] - 0s - loss: 0.0043 - val_loss: 0.0026
Epoch 105/500
81/81 [==============================] - 0s - loss: 0.0034 - val_loss: 0.0036
Epoch 106/500
81/81 [==============================] - 0s - loss: 0.0030 - val_loss: 0.0030
Epoch 107/500
81/81 [==============================] - 0s - loss: 0.0028 - val_loss: 0.0023
Epoch 108/500
81/81 [==============================] - 0s - loss: 0.0033 - val_loss: 0.0022
Epoch 109/500
81/81 [==============================] - 0s - loss: 0.0028 - val_loss: 0.0042
Epoch 110/500
81/81 [==============================] - 0s - loss: 0.0035 - val_loss: 0.0025
Epoch 111/500
81/81 [==============================] - 0s - loss: 0.0031 - val_loss: 0.0020
Epoch 112/500
81/81 [==============================] - 0s - loss: 0.0028 - val_loss: 0.0032
Epoch 113/500
81/81 [==============================] - 0s - loss: 0.0028 - val_loss: 0.0031
Epoch 114/500
81/81 [==============================] - 0s - loss: 0.0026 - val_loss: 0.0020
Epoch 115/500
81/81 [==============================] - 0s - loss: 0.0030 - val_loss: 0.0019
Epoch 116/500
81/81 [==============================] - 0s - loss: 0.0024 - val_loss: 0.0024
Epoch 117/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0024
Epoch 118/500
81/81 [==============================] - 0s - loss: 0.0024 - val_loss: 0.0027
Epoch 119/500
81/81 [==============================] - 0s - loss: 0.0021 - val_loss: 0.0014
Epoch 120/500
81/81 [==============================] - 0s - loss: 0.0028 - val_loss: 0.0020
Epoch 121/500
81/81 [==============================] - 0s - loss: 0.0026 - val_loss: 0.0021
Epoch 122/500
81/81 [==============================] - 0s - loss: 0.0041 - val_loss: 0.0067
Epoch 123/500
81/81 [==============================] - 0s - loss: 0.0084 - val_loss: 0.0051
Epoch 124/500
81/81 [==============================] - 0s - loss: 0.0046 - val_loss: 0.0043
Epoch 125/500
81/81 [==============================] - 0s - loss: 0.0025 - val_loss: 0.0026
Epoch 126/500
81/81 [==============================] - 0s - loss: 0.0031 - val_loss: 0.0029
Epoch 127/500
81/81 [==============================] - 0s - loss: 0.0027 - val_loss: 0.0034
Epoch 128/500
81/81 [==============================] - 0s - loss: 0.0025 - val_loss: 0.0022
Epoch 129/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0020
Epoch 130/500
81/81 [==============================] - 0s - loss: 0.0020 - val_loss: 0.0019
Epoch 131/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0027
Epoch 132/500
81/81 [==============================] - 0s - loss: 0.0022 - val_loss: 0.0028
Epoch 133/500
81/81 [==============================] - 0s - loss: 0.0022 - val_loss: 0.0060
Epoch 134/500
81/81 [==============================] - 0s - loss: 0.0071 - val_loss: 0.0034
Epoch 135/500
81/81 [==============================] - 0s - loss: 0.0021 - val_loss: 0.0024
Epoch 136/500
81/81 [==============================] - 0s - loss: 0.0020 - val_loss: 0.0025
Epoch 137/500
81/81 [==============================] - 0s - loss: 0.0029 - val_loss: 0.0016
Epoch 138/500
81/81 [==============================] - 0s - loss: 0.0026 - val_loss: 0.0055
Epoch 139/500
81/81 [==============================] - 0s - loss: 0.0038 - val_loss: 0.0026
Epoch 140/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0019
Epoch 141/500
81/81 [==============================] - 0s - loss: 0.0026 - val_loss: 0.0020
Epoch 142/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0018
Epoch 143/500
81/81 [==============================] - 0s - loss: 0.0017 - val_loss: 0.0018
Epoch 144/500
81/81 [==============================] - 0s - loss: 0.0020 - val_loss: 0.0023
Epoch 145/500
81/81 [==============================] - 0s - loss: 0.0034 - val_loss: 0.0032
Epoch 146/500
81/81 [==============================] - 0s - loss: 0.0035 - val_loss: 0.0023
Epoch 147/500
81/81 [==============================] - 0s - loss: 0.0025 - val_loss: 0.0017
Epoch 148/500
81/81 [==============================] - 0s - loss: 0.0035 - val_loss: 0.0039
Epoch 149/500
81/81 [==============================] - 0s - loss: 0.0027 - val_loss: 0.0018
Epoch 150/500
81/81 [==============================] - 0s - loss: 0.0024 - val_loss: 0.0056
Epoch 151/500
81/81 [==============================] - 0s - loss: 0.0050 - val_loss: 0.0021
Epoch 152/500
81/81 [==============================] - 0s - loss: 0.0030 - val_loss: 0.0028
Epoch 153/500
81/81 [==============================] - 0s - loss: 0.0026 - val_loss: 0.0018
Epoch 154/500
81/81 [==============================] - 0s - loss: 0.0029 - val_loss: 0.0022
Epoch 155/500
81/81 [==============================] - 0s - loss: 0.0028 - val_loss: 0.0026
Epoch 156/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0021
Epoch 157/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0022
Epoch 158/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0017
Epoch 159/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0015
Epoch 160/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0019
Epoch 161/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0016
Epoch 162/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0015
Epoch 163/500
81/81 [==============================] - 0s - loss: 0.0017 - val_loss: 0.0029
Epoch 164/500
81/81 [==============================] - 0s - loss: 0.0027 - val_loss: 0.0014
Epoch 165/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0014
Epoch 166/500
81/81 [==============================] - 0s - loss: 0.0017 - val_loss: 0.0030
Epoch 167/500
81/81 [==============================] - 0s - loss: 0.0030 - val_loss: 0.0028
Epoch 168/500
81/81 [==============================] - 0s - loss: 0.0025 - val_loss: 0.0032
Epoch 169/500
81/81 [==============================] - 0s - loss: 0.0021 - val_loss: 0.0019
Epoch 170/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0017
Epoch 171/500
81/81 [==============================] - 0s - loss: 0.0017 - val_loss: 0.0016
Epoch 172/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0014
Epoch 173/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0017
Epoch 174/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0014
Epoch 175/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0013
Epoch 176/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0016
Epoch 177/500
81/81 [==============================] - 0s - loss: 0.0017 - val_loss: 0.0014
Epoch 178/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0011
Epoch 179/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0011
Epoch 180/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0014
Epoch 181/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0013
Epoch 182/500
81/81 [==============================] - 0s - loss: 0.0022 - val_loss: 0.0036
Epoch 183/500
81/81 [==============================] - 0s - loss: 0.0054 - val_loss: 0.0039
Epoch 184/500
81/81 [==============================] - 0s - loss: 0.0043 - val_loss: 0.0274
Epoch 185/500
81/81 [==============================] - 0s - loss: 0.0209 - val_loss: 0.0136
Epoch 186/500
81/81 [==============================] - 0s - loss: 0.0085 - val_loss: 0.0129
Epoch 187/500
81/81 [==============================] - 0s - loss: 0.0068 - val_loss: 0.0127
Epoch 188/500
81/81 [==============================] - 0s - loss: 0.0078 - val_loss: 0.0077
Epoch 189/500
81/81 [==============================] - 0s - loss: 0.0066 - val_loss: 0.0061
Epoch 190/500
81/81 [==============================] - 0s - loss: 0.0047 - val_loss: 0.0068
Epoch 191/500
81/81 [==============================] - 0s - loss: 0.0052 - val_loss: 0.0048
Epoch 192/500
81/81 [==============================] - 0s - loss: 0.0037 - val_loss: 0.0058
Epoch 193/500
81/81 [==============================] - 0s - loss: 0.0043 - val_loss: 0.0052
Epoch 194/500
81/81 [==============================] - 0s - loss: 0.0037 - val_loss: 0.0040
Epoch 195/500
81/81 [==============================] - 0s - loss: 0.0029 - val_loss: 0.0026
Epoch 196/500
81/81 [==============================] - 0s - loss: 0.0024 - val_loss: 0.0033
Epoch 197/500
81/81 [==============================] - 0s - loss: 0.0022 - val_loss: 0.0025
Epoch 198/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0022
Epoch 199/500
81/81 [==============================] - 0s - loss: 0.0021 - val_loss: 0.0025
Epoch 200/500
81/81 [==============================] - 0s - loss: 0.0022 - val_loss: 0.0024
Epoch 201/500
81/81 [==============================] - 0s - loss: 0.0028 - val_loss: 0.0021
Epoch 202/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0015
Epoch 203/500
81/81 [==============================] - 0s - loss: 0.0017 - val_loss: 0.0020
Epoch 204/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0014
Epoch 205/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0017
Epoch 206/500
81/81 [==============================] - 0s - loss: 0.0021 - val_loss: 0.0024
Epoch 207/500
81/81 [==============================] - 0s - loss: 0.0024 - val_loss: 0.0014
Epoch 208/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0017
Epoch 209/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0016
Epoch 210/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0013
Epoch 211/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0017
Epoch 212/500
81/81 [==============================] - 0s - loss: 0.0017 - val_loss: 0.0014
Epoch 213/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0014
Epoch 214/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0014
Epoch 215/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0016
Epoch 216/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0013
Epoch 217/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0011
Epoch 218/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0018
Epoch 219/500
81/81 [==============================] - 0s - loss: 0.0020 - val_loss: 0.0012
Epoch 220/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0014
Epoch 221/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0014
Epoch 222/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0015
Epoch 223/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0013
Epoch 224/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0027
Epoch 225/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0014
Epoch 226/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0014
Epoch 227/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0021
Epoch 228/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0013
Epoch 229/500
81/81 [==============================] - 0s - loss: 0.0020 - val_loss: 0.0014
Epoch 230/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0028
Epoch 231/500
81/81 [==============================] - 0s - loss: 0.0024 - val_loss: 0.0020
Epoch 232/500
81/81 [==============================] - 0s - loss: 0.0026 - val_loss: 0.0020
Epoch 233/500
81/81 [==============================] - 0s - loss: 0.0035 - val_loss: 0.0059
Epoch 234/500
81/81 [==============================] - 0s - loss: 0.0048 - val_loss: 0.0180
Epoch 235/500
81/81 [==============================] - 0s - loss: 0.0108 - val_loss: 0.0100
Epoch 236/500
81/81 [==============================] - 0s - loss: 0.0067 - val_loss: 0.0069
Epoch 237/500
81/81 [==============================] - 0s - loss: 0.0057 - val_loss: 0.0063
Epoch 238/500
81/81 [==============================] - 0s - loss: 0.0032 - val_loss: 0.0041
Epoch 239/500
81/81 [==============================] - 0s - loss: 0.0039 - val_loss: 0.0051
Epoch 240/500
81/81 [==============================] - 0s - loss: 0.0038 - val_loss: 0.0041
Epoch 241/500
81/81 [==============================] - 0s - loss: 0.0042 - val_loss: 0.0045
Epoch 242/500
81/81 [==============================] - 0s - loss: 0.0027 - val_loss: 0.0049
Epoch 243/500
81/81 [==============================] - 0s - loss: 0.0040 - val_loss: 0.0057
Epoch 244/500
81/81 [==============================] - 0s - loss: 0.0045 - val_loss: 0.0039
Epoch 245/500
81/81 [==============================] - 0s - loss: 0.0039 - val_loss: 0.0050
Epoch 246/500
81/81 [==============================] - 0s - loss: 0.0041 - val_loss: 0.0032
Epoch 247/500
81/81 [==============================] - 0s - loss: 0.0032 - val_loss: 0.0049
Epoch 248/500
81/81 [==============================] - 0s - loss: 0.0040 - val_loss: 0.0032
Epoch 249/500
81/81 [==============================] - 0s - loss: 0.0036 - val_loss: 0.0046
Epoch 250/500
81/81 [==============================] - 0s - loss: 0.0029 - val_loss: 0.0028
Epoch 251/500
81/81 [==============================] - 0s - loss: 0.0028 - val_loss: 0.0026
Epoch 252/500
81/81 [==============================] - 0s - loss: 0.0021 - val_loss: 0.0022
Epoch 253/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0031
Epoch 254/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0019
Epoch 255/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0023
Epoch 256/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0018
Epoch 257/500
81/81 [==============================] - 0s - loss: 0.0020 - val_loss: 0.0046
Epoch 258/500
81/81 [==============================] - 0s - loss: 0.0034 - val_loss: 0.0028
Epoch 259/500
81/81 [==============================] - 0s - loss: 0.0029 - val_loss: 0.0053
Epoch 260/500
81/81 [==============================] - 0s - loss: 0.0036 - val_loss: 0.0027
Epoch 261/500
81/81 [==============================] - 0s - loss: 0.0035 - val_loss: 0.0042
Epoch 262/500
81/81 [==============================] - 0s - loss: 0.0030 - val_loss: 0.0026
Epoch 263/500
81/81 [==============================] - 0s - loss: 0.0025 - val_loss: 0.0033
Epoch 264/500
81/81 [==============================] - 0s - loss: 0.0030 - val_loss: 0.0027
Epoch 265/500
81/81 [==============================] - 0s - loss: 0.0024 - val_loss: 0.0055
Epoch 266/500
81/81 [==============================] - 0s - loss: 0.0039 - val_loss: 0.0021
Epoch 267/500
81/81 [==============================] - 0s - loss: 0.0040 - val_loss: 0.0035
Epoch 268/500
81/81 [==============================] - 0s - loss: 0.0089 - val_loss: 0.0046
Epoch 269/500
81/81 [==============================] - 0s - loss: 0.0041 - val_loss: 0.0045
Epoch 270/500
81/81 [==============================] - 0s - loss: 0.0046 - val_loss: 0.0080
Epoch 271/500
81/81 [==============================] - 0s - loss: 0.0050 - val_loss: 0.0095
Epoch 272/500
81/81 [==============================] - 0s - loss: 0.0061 - val_loss: 0.0080
Epoch 273/500
81/81 [==============================] - 0s - loss: 0.0063 - val_loss: 0.0073
Epoch 274/500
81/81 [==============================] - 0s - loss: 0.0054 - val_loss: 0.0068
Epoch 275/500
81/81 [==============================] - 0s - loss: 0.0048 - val_loss: 0.0052
Epoch 276/500
81/81 [==============================] - 0s - loss: 0.0050 - val_loss: 0.0038
Epoch 277/500
81/81 [==============================] - 0s - loss: 0.0026 - val_loss: 0.0027
Epoch 278/500
81/81 [==============================] - 0s - loss: 0.0028 - val_loss: 0.0040
Epoch 279/500
81/81 [==============================] - 0s - loss: 0.0031 - val_loss: 0.0046
Epoch 280/500
81/81 [==============================] - 0s - loss: 0.0046 - val_loss: 0.0064
Epoch 281/500
81/81 [==============================] - 0s - loss: 0.0052 - val_loss: 0.0042
Epoch 282/500
81/81 [==============================] - 0s - loss: 0.0042 - val_loss: 0.0056
Epoch 283/500
81/81 [==============================] - 0s - loss: 0.0043 - val_loss: 0.0031
Epoch 284/500
81/81 [==============================] - 0s - loss: 0.0033 - val_loss: 0.0036
Epoch 285/500
81/81 [==============================] - 0s - loss: 0.0036 - val_loss: 0.0019
Epoch 286/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0023
Epoch 287/500
81/81 [==============================] - 0s - loss: 0.0025 - val_loss: 0.0022
Epoch 288/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0026
Epoch 289/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0019
Epoch 290/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0022
Epoch 291/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0016
Epoch 292/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0020
Epoch 293/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0016
Epoch 294/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0025
Epoch 295/500
81/81 [==============================] - 0s - loss: 0.0020 - val_loss: 0.0015
Epoch 296/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0021
Epoch 297/500
81/81 [==============================] - 0s - loss: 0.0017 - val_loss: 0.0016
Epoch 298/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0016
Epoch 299/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0014
Epoch 300/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0015
Epoch 301/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0016
Epoch 302/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0014
Epoch 303/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0014
Epoch 304/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0015
Epoch 305/500
81/81 [==============================] - 0s - loss: 0.0013 - val_loss: 0.0012
Epoch 306/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0015
Epoch 307/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0012
Epoch 308/500
81/81 [==============================] - 0s - loss: 0.0013 - val_loss: 0.0022
Epoch 309/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0013
Epoch 310/500
81/81 [==============================] - 0s - loss: 0.0013 - val_loss: 0.0014
Epoch 311/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0013
Epoch 312/500
81/81 [==============================] - 0s - loss: 0.0017 - val_loss: 0.0018
Epoch 313/500
81/81 [==============================] - 0s - loss: 0.0013 - val_loss: 0.0012
Epoch 314/500
81/81 [==============================] - 0s - loss: 0.0022 - val_loss: 0.0011
Epoch 315/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0031
Epoch 316/500
81/81 [==============================] - 0s - loss: 0.0024 - val_loss: 0.0029
Epoch 317/500
81/81 [==============================] - 0s - loss: 0.0035 - val_loss: 0.0026
Epoch 318/500
81/81 [==============================] - 0s - loss: 0.0024 - val_loss: 0.0015
Epoch 319/500
81/81 [==============================] - 0s - loss: 0.0034 - val_loss: 0.0024
Epoch 320/500
81/81 [==============================] - 0s - loss: 0.0038 - val_loss: 0.0039
Epoch 321/500
81/81 [==============================] - 0s - loss: 0.0097 - val_loss: 0.0060
Epoch 322/500
81/81 [==============================] - 0s - loss: 0.0058 - val_loss: 0.0039
Epoch 323/500
81/81 [==============================] - 0s - loss: 0.0063 - val_loss: 0.0039
Epoch 324/500
81/81 [==============================] - 0s - loss: 0.0048 - val_loss: 0.0023
Epoch 325/500
81/81 [==============================] - 0s - loss: 0.0055 - val_loss: 0.0025
Epoch 326/500
81/81 [==============================] - 0s - loss: 0.0055 - val_loss: 0.0039
Epoch 327/500
81/81 [==============================] - 0s - loss: 0.0052 - val_loss: 0.0034
Epoch 328/500
81/81 [==============================] - 0s - loss: 0.0055 - val_loss: 0.0029
Epoch 329/500
81/81 [==============================] - 0s - loss: 0.0044 - val_loss: 0.0044
Epoch 330/500
81/81 [==============================] - 0s - loss: 0.0048 - val_loss: 0.0021
Epoch 331/500
81/81 [==============================] - 0s - loss: 0.0031 - val_loss: 0.0045
Epoch 332/500
81/81 [==============================] - 0s - loss: 0.0031 - val_loss: 0.0022
Epoch 333/500
81/81 [==============================] - 0s - loss: 0.0020 - val_loss: 0.0037
Epoch 334/500
81/81 [==============================] - 0s - loss: 0.0031 - val_loss: 0.0023
Epoch 335/500
81/81 [==============================] - 0s - loss: 0.0029 - val_loss: 0.0041
Epoch 336/500
81/81 [==============================] - 0s - loss: 0.0029 - val_loss: 0.0017
Epoch 337/500
81/81 [==============================] - 0s - loss: 0.0021 - val_loss: 0.0031
Epoch 338/500
81/81 [==============================] - 0s - loss: 0.0024 - val_loss: 0.0025
Epoch 339/500
81/81 [==============================] - 0s - loss: 0.0037 - val_loss: 0.0042
Epoch 340/500
81/81 [==============================] - 0s - loss: 0.0031 - val_loss: 0.0025
Epoch 341/500
81/81 [==============================] - 0s - loss: 0.0027 - val_loss: 0.0031
Epoch 342/500
81/81 [==============================] - 0s - loss: 0.0022 - val_loss: 0.0014
Epoch 343/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0021
Epoch 344/500
81/81 [==============================] - 0s - loss: 0.0021 - val_loss: 0.0017
Epoch 345/500
81/81 [==============================] - 0s - loss: 0.0029 - val_loss: 0.0037
Epoch 346/500
81/81 [==============================] - 0s - loss: 0.0034 - val_loss: 0.0024
Epoch 347/500
81/81 [==============================] - 0s - loss: 0.0031 - val_loss: 0.0039
Epoch 348/500
81/81 [==============================] - 0s - loss: 0.0037 - val_loss: 0.0019
Epoch 349/500
81/81 [==============================] - 0s - loss: 0.0031 - val_loss: 0.0030
Epoch 350/500
81/81 [==============================] - 0s - loss: 0.0039 - val_loss: 0.0021
Epoch 351/500
81/81 [==============================] - 0s - loss: 0.0043 - val_loss: 0.0038
Epoch 352/500
81/81 [==============================] - 0s - loss: 0.0069 - val_loss: 0.0058
Epoch 353/500
81/81 [==============================] - 0s - loss: 0.0052 - val_loss: 0.0052
Epoch 354/500
81/81 [==============================] - 0s - loss: 0.0041 - val_loss: 0.0055
Epoch 355/500
81/81 [==============================] - 0s - loss: 0.0047 - val_loss: 0.0021
Epoch 356/500
81/81 [==============================] - 0s - loss: 0.0048 - val_loss: 0.0050
Epoch 357/500
81/81 [==============================] - 0s - loss: 0.0040 - val_loss: 0.0020
Epoch 358/500
81/81 [==============================] - 0s - loss: 0.0024 - val_loss: 0.0024
Epoch 359/500
81/81 [==============================] - 0s - loss: 0.0024 - val_loss: 0.0021
Epoch 360/500
81/81 [==============================] - 0s - loss: 0.0033 - val_loss: 0.0026
Epoch 361/500
81/81 [==============================] - 0s - loss: 0.0043 - val_loss: 0.0019
Epoch 362/500
81/81 [==============================] - 0s - loss: 0.0040 - val_loss: 0.0033
Epoch 363/500
81/81 [==============================] - 0s - loss: 0.0046 - val_loss: 0.0058
Epoch 364/500
81/81 [==============================] - 0s - loss: 0.0044 - val_loss: 0.0038
Epoch 365/500
81/81 [==============================] - 0s - loss: 0.0044 - val_loss: 0.0043
Epoch 366/500
81/81 [==============================] - 0s - loss: 0.0031 - val_loss: 0.0019
Epoch 367/500
81/81 [==============================] - 0s - loss: 0.0032 - val_loss: 0.0051
Epoch 368/500
81/81 [==============================] - 0s - loss: 0.0055 - val_loss: 0.0019
Epoch 369/500
81/81 [==============================] - 0s - loss: 0.0067 - val_loss: 0.0038
Epoch 370/500
81/81 [==============================] - 0s - loss: 0.0090 - val_loss: 0.0095
Epoch 371/500
81/81 [==============================] - 0s - loss: 0.0095 - val_loss: 0.0099
Epoch 372/500
81/81 [==============================] - 0s - loss: 0.0086 - val_loss: 0.0065
Epoch 373/500
81/81 [==============================] - 0s - loss: 0.0061 - val_loss: 0.0048
Epoch 374/500
81/81 [==============================] - 0s - loss: 0.0035 - val_loss: 0.0055
Epoch 375/500
81/81 [==============================] - 0s - loss: 0.0047 - val_loss: 0.0094
Epoch 376/500
81/81 [==============================] - 0s - loss: 0.0040 - val_loss: 0.0045
Epoch 377/500
81/81 [==============================] - 0s - loss: 0.0034 - val_loss: 0.0042
Epoch 378/500
81/81 [==============================] - 0s - loss: 0.0042 - val_loss: 0.0041
Epoch 379/500
81/81 [==============================] - 0s - loss: 0.0037 - val_loss: 0.0032
Epoch 380/500
81/81 [==============================] - 0s - loss: 0.0026 - val_loss: 0.0037
Epoch 381/500
81/81 [==============================] - 0s - loss: 0.0022 - val_loss: 0.0036
Epoch 382/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0040
Epoch 383/500
81/81 [==============================] - 0s - loss: 0.0020 - val_loss: 0.0026
Epoch 384/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0024
Epoch 385/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0020
Epoch 386/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0018
Epoch 387/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0024
Epoch 388/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0015
Epoch 389/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0018
Epoch 390/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 9.5886e-04
Epoch 391/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0011
Epoch 392/500
81/81 [==============================] - 0s - loss: 0.0020 - val_loss: 0.0017
Epoch 393/500
81/81 [==============================] - 0s - loss: 0.0013 - val_loss: 0.0011
Epoch 394/500
81/81 [==============================] - 0s - loss: 0.0011 - val_loss: 0.0016
Epoch 395/500
81/81 [==============================] - 0s - loss: 0.0012 - val_loss: 0.0011
Epoch 396/500
81/81 [==============================] - 0s - loss: 0.0011 - val_loss: 9.5391e-04
Epoch 397/500
81/81 [==============================] - 0s - loss: 0.0012 - val_loss: 0.0011
Epoch 398/500
81/81 [==============================] - 0s - loss: 0.0012 - val_loss: 9.6204e-04
Epoch 399/500
81/81 [==============================] - 0s - loss: 0.0011 - val_loss: 9.5362e-04
Epoch 400/500
81/81 [==============================] - 0s - loss: 0.0012 - val_loss: 0.0013
Epoch 401/500
81/81 [==============================] - 0s - loss: 0.0013 - val_loss: 0.0011
Epoch 402/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0014
Epoch 403/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 9.9732e-04
Epoch 404/500
81/81 [==============================] - 0s - loss: 0.0012 - val_loss: 8.3686e-04
Epoch 405/500
81/81 [==============================] - 0s - loss: 0.0017 - val_loss: 0.0013
Epoch 406/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0016
Epoch 407/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0010
Epoch 408/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0032
Epoch 409/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0012
Epoch 410/500
81/81 [==============================] - 0s - loss: 0.0021 - val_loss: 0.0026
Epoch 411/500
81/81 [==============================] - 0s - loss: 0.0020 - val_loss: 0.0017
Epoch 412/500
81/81 [==============================] - 0s - loss: 0.0013 - val_loss: 0.0036
Epoch 413/500
81/81 [==============================] - 0s - loss: 0.0026 - val_loss: 0.0014
Epoch 414/500
81/81 [==============================] - 0s - loss: 0.0022 - val_loss: 0.0029
Epoch 415/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0016
Epoch 416/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0026
Epoch 417/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0012
Epoch 418/500
81/81 [==============================] - 0s - loss: 0.0017 - val_loss: 0.0028
Epoch 419/500
81/81 [==============================] - 0s - loss: 0.0017 - val_loss: 0.0012
Epoch 420/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0022
Epoch 421/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0013
Epoch 422/500
81/81 [==============================] - 0s - loss: 0.0013 - val_loss: 0.0026
Epoch 423/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0011
Epoch 424/500
81/81 [==============================] - 0s - loss: 0.0013 - val_loss: 0.0015
Epoch 425/500
81/81 [==============================] - 0s - loss: 0.0013 - val_loss: 0.0011
Epoch 426/500
81/81 [==============================] - 0s - loss: 0.0012 - val_loss: 0.0020
Epoch 427/500
81/81 [==============================] - 0s - loss: 0.0012 - val_loss: 0.0011
Epoch 428/500
81/81 [==============================] - 0s - loss: 0.0012 - val_loss: 0.0020
Epoch 429/500
81/81 [==============================] - 0s - loss: 0.0012 - val_loss: 0.0011
Epoch 430/500
81/81 [==============================] - 0s - loss: 0.0011 - val_loss: 0.0024
Epoch 431/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0026
Epoch 432/500
81/81 [==============================] - 0s - loss: 0.0036 - val_loss: 0.0096
Epoch 433/500
81/81 [==============================] - 0s - loss: 0.0063 - val_loss: 0.0036
Epoch 434/500
81/81 [==============================] - 0s - loss: 0.0058 - val_loss: 0.0026
Epoch 435/500
81/81 [==============================] - 0s - loss: 0.0037 - val_loss: 0.0044
Epoch 436/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0023
Epoch 437/500
81/81 [==============================] - 0s - loss: 0.0025 - val_loss: 0.0060
Epoch 438/500
81/81 [==============================] - 0s - loss: 0.0035 - val_loss: 0.0033
Epoch 439/500
81/81 [==============================] - 0s - loss: 0.0028 - val_loss: 0.0028
Epoch 440/500
81/81 [==============================] - 0s - loss: 0.0023 - val_loss: 0.0018
Epoch 441/500
81/81 [==============================] - 0s - loss: 0.0019 - val_loss: 0.0014
Epoch 442/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0039
Epoch 443/500
81/81 [==============================] - 0s - loss: 0.0021 - val_loss: 0.0018
Epoch 444/500
81/81 [==============================] - 0s - loss: 0.0032 - val_loss: 0.0035
Epoch 445/500
81/81 [==============================] - 0s - loss: 0.0024 - val_loss: 0.0015
Epoch 446/500
81/81 [==============================] - 0s - loss: 0.0013 - val_loss: 0.0014
Epoch 447/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0023
Epoch 448/500
81/81 [==============================] - 0s - loss: 0.0013 - val_loss: 0.0013
Epoch 449/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0024
Epoch 450/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0017
Epoch 451/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0015
Epoch 452/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0016
Epoch 453/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0015
Epoch 454/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0021
Epoch 455/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0021
Epoch 456/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0011
Epoch 457/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0017
Epoch 458/500
81/81 [==============================] - 0s - loss: 0.0011 - val_loss: 0.0013
Epoch 459/500
81/81 [==============================] - 0s - loss: 0.0012 - val_loss: 0.0011
Epoch 460/500
81/81 [==============================] - 0s - loss: 0.0011 - val_loss: 0.0013
Epoch 461/500
81/81 [==============================] - 0s - loss: 0.0012 - val_loss: 0.0014
Epoch 462/500
81/81 [==============================] - 0s - loss: 0.0010 - val_loss: 0.0011
Epoch 463/500
81/81 [==============================] - 0s - loss: 0.0011 - val_loss: 0.0010
Epoch 464/500
81/81 [==============================] - 0s - loss: 0.0011 - val_loss: 0.0018
Epoch 465/500
81/81 [==============================] - 0s - loss: 0.0017 - val_loss: 0.0010
Epoch 466/500
81/81 [==============================] - 0s - loss: 0.0016 - val_loss: 0.0026
Epoch 467/500
81/81 [==============================] - 0s - loss: 0.0020 - val_loss: 0.0015
Epoch 468/500
81/81 [==============================] - 0s - loss: 0.0012 - val_loss: 0.0021
Epoch 469/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0017
Epoch 470/500
81/81 [==============================] - 0s - loss: 0.0018 - val_loss: 0.0025
Epoch 471/500
81/81 [==============================] - 0s - loss: 0.0021 - val_loss: 0.0015
Epoch 472/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0021
Epoch 473/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0011
Epoch 474/500
81/81 [==============================] - 0s - loss: 0.0014 - val_loss: 0.0019
Epoch 475/500
81/81 [==============================] - 0s - loss: 0.0015 - val_loss: 0.0010
Epoch 476/500
81/81 [==============================] - 0s - loss: 0.0012 - val_loss: 0.0011
Epoch 477/500
81/81 [==============================] - 0s - loss: 9.1748e-04 - val_loss: 0.0013
Epoch 478/500
81/81 [==============================] - 0s - loss: 0.0011 - val_loss: 0.0015
Epoch 479/500
81/81 [==============================] - 0s - loss: 0.0011 - val_loss: 8.5655e-04
Epoch 480/500
81/81 [==============================] - 0s - loss: 9.3819e-04 - val_loss: 0.0013
Epoch 481/500
81/81 [==============================] - 0s - loss: 0.0011 - val_loss: 9.9584e-04
Epoch 482/500
81/81 [==============================] - 0s - loss: 0.0011 - val_loss: 0.0012
Epoch 483/500
81/81 [==============================] - 0s - loss: 9.5303e-04 - val_loss: 0.0014
Epoch 484/500
81/81 [==============================] - 0s - loss: 9.2984e-04 - val_loss: 0.0013
Epoch 485/500
81/81 [==============================] - 0s - loss: 0.0010 - val_loss: 0.0012
Epoch 486/500
81/81 [==============================] - 0s - loss: 0.0010 - val_loss: 9.1243e-04
Epoch 487/500
81/81 [==============================] - 0s - loss: 8.6113e-04 - val_loss: 0.0012
Epoch 488/500
81/81 [==============================] - 0s - loss: 9.5227e-04 - val_loss: 9.4278e-04
Epoch 489/500
81/81 [==============================] - 0s - loss: 8.3974e-04 - val_loss: 9.1512e-04
Epoch 490/500
81/81 [==============================] - 0s - loss: 9.8466e-04 - val_loss: 9.1781e-04
Epoch 491/500
81/81 [==============================] - 0s - loss: 8.3699e-04 - val_loss: 0.0010
Epoch 492/500
81/81 [==============================] - 0s - loss: 9.2574e-04 - val_loss: 9.3649e-04
Epoch 493/500
81/81 [==============================] - 0s - loss: 8.3958e-04 - val_loss: 9.9284e-04
Epoch 494/500
81/81 [==============================] - 0s - loss: 9.5732e-04 - val_loss: 9.6270e-04
Epoch 495/500
81/81 [==============================] - 0s - loss: 0.0010 - val_loss: 0.0017
Epoch 496/500
81/81 [==============================] - 0s - loss: 0.0010 - val_loss: 0.0011
Epoch 497/500
81/81 [==============================] - 0s - loss: 0.0011 - val_loss: 0.0015
Epoch 498/500
81/81 [==============================] - 0s - loss: 9.7953e-04 - val_loss: 9.0158e-04
Epoch 499/500
81/81 [==============================] - 0s - loss: 9.7376e-04 - val_loss: 0.0010
Epoch 500/500
81/81 [==============================] - 0s - loss: 8.6384e-04 - val_loss: 8.8626e-04
In [141]:
## Create our predicted y's based on the model
df['y_predicted'] = model.predict(df['x'], batch_size=32, verbose=0)
g = sns.FacetGrid(df, size=4, aspect=1.5)
g.map(plt.plot, "x_definition", "y_definition")
g.map(plt.scatter, "x", "y_perfect", color='blue')
g.map(plt.scatter, "x", "y", color='green')
g.map(plt.scatter, "x", "y_predicted", color='red')
Out[141]:
<seaborn.axisgrid.FacetGrid at 0x7f457ba7a950>
In [138]:
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'valid'], loc='upper right')
plt.show()
In [104]:
model.get_weights()[8].shape
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-104-a3811325abd7> in <module>()
----> 1 model.get_weights()[8].shape
IndexError: list index out of range
In [ ]:
Content source: kmclaugh/fastai_courses
Similar notebooks: