项目链接:https://www.kesci.com/notebooks/run/5b2b531cf110337467b156b4?label=5afe95345e69f70080f0de2f
import pandas as pd
data_2=pd.read_csv("/home/kesci/input/client7166/international-airline-passengers.csv",sep=",",usecols=[1])
##data_1[["Date","Cost"]]
data_2
passengers
0 112
1 118
2 132
3 129
4 121
5 135
6 148
7 148
8 136
9 119
10 104
11 118
12 115
13 126
14 141
15 135
16 125
17 149
18 170
19 170
20 158
21 133
22 114
23 140
24 145
25 150
26 178
27 163
28 172
29 178
... ...
114 491
115 505
116 404
117 359
118 310
119 337
120 360
121 342
122 406
123 396
124 420
125 472
126 548
127 559
128 463
129 407
130 362
131 405
132 417
133 391
134 419
135 461
136 472
137 535
138 622
139 606
140 508
141 461
142 390
143 432
144 rows × 1 columns
time: 13.4 ms
# 显示cell运行时长
%load_ext klab-autotime
import pandas as pd
data_1=pd.read_csv("/home/kesci/input/foshan9801/foshan",sep="\t",nrows=5)
#data_1=data_1[["Date","Cost"]]
data_1['Cost']=[x*0.000437 for x in data_1["Cost"]]
data_1.head
The klab-autotime extension is already loaded. To reload it, use:
%reload_ext klab-autotime
time: 104 ms
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import MinMaxScaler
from keras.models import Sequential
from keras.layers import LSTM, Dense, Activation
def load_data(file_name, sequence_length=7, split=0.8):
df = pd.read_csv("/home/kesci/input/foshan9801/foshan",sep="\t",usecols=[4],nrows=1000)
#df = pd.read_csv(file_name,sep=",",usecols=[1],nrows=144)
#df=df_1[["Date","Cost"]]
# df['Cost']=[x*0.000437*0.8*0.35 for x in df["Cost"]]
data_all = np.array(df).astype(float)
scaler = MinMaxScaler()
data_all = scaler.fit_transform(data_all)
data = []
for i in range(len(data_all) - sequence_length - 1):
data.append(data_all[i: i + sequence_length + 1])
reshaped_data = np.array(data).astype('float64')
np.random.shuffle(reshaped_data)
# 对x进行统一归一化,而y则不归一化
x = reshaped_data[:, :-1]
y = reshaped_data[:, -1]
split_boundary = int(reshaped_data.shape[0] * split)
train_x = x[: split_boundary]
test_x = x[split_boundary:]
train_y = y[: split_boundary]
test_y = y[split_boundary:]
return train_x, train_y, test_x, test_y, scaler
def build_model():
# input_dim是输入的train_x的最后一个维度,train_x的维度为(n_samples, time_steps, input_dim)
model = Sequential()
model.add(LSTM(input_dim=1, output_dim=50, return_sequences=True))
print(model.layers)
model.add(LSTM(200, return_sequences=False))
model.add(Dense(output_dim=1))
model.add(Activation('linear'))
model.compile(loss='mse', optimizer='rmsprop')
return model
def train_model(train_x, train_y, test_x, test_y):
model = build_model()
try:
model.fit(train_x, train_y, batch_size=512, nb_epoch=500, validation_split=0.1)
predict = model.predict(test_x)
predict = np.reshape(predict, (predict.size, ))
except KeyboardInterrupt:
print(predict)
print(test_y)
print(predict)
print(test_y)
try:
fig = plt.figure(1)
plt.plot(predict, 'r:')
plt.plot(test_y, 'g-')
plt.legend(['predict', 'true'])
except Exception as e:
print(e)
return predict, test_y
if __name__ == '__main__':
train_x, train_y, test_x, test_y, scaler = load_data('/home/kesci/input/client7166/international-airline-passengers.csv')
train_x = np.reshape(train_x, (train_x.shape[0], train_x.shape[1], 1))
test_x = np.reshape(test_x, (test_x.shape[0], test_x.shape[1], 1))
predict_y, test_y = train_model(train_x, train_y, test_x, test_y)
predict_y = scaler.inverse_transform([[i] for i in predict_y])
test_y = scaler.inverse_transform(test_y)
fig2 = plt.figure(2)
plt.plot(predict_y, 'g:')
plt.plot(test_y, 'r-')
plt.legend(['predict', 'true'])
plt.show()
/opt/conda/lib/python3.5/site-packages/matplotlib/font_manager.py:278: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
'Matplotlib is building the font cache using fc-list. '
Using TensorFlow backend.
/opt/conda/lib/python3.5/site-packages/ipykernel_launcher.py:39: UserWarning: The `input_dim` and `input_length` arguments in recurrent layers are deprecated. Use `input_shape` instead.
/opt/conda/lib/python3.5/site-packages/ipykernel_launcher.py:39: UserWarning: Update your `LSTM` call to the Keras 2 API: `LSTM(return_sequences=True, input_shape=(None, 1), units=50)`
[]
/opt/conda/lib/python3.5/site-packages/ipykernel_launcher.py:42: UserWarning: Update your `Dense` call to the Keras 2 API: `Dense(units=1)`
/opt/conda/lib/python3.5/site-packages/keras/models.py:942: UserWarning: The `nb_epoch` argument in `fit` has been renamed `epochs`.
warnings.warn('The `nb_epoch` argument in `fit` '
Train on 713 samples, validate on 80 samples
Epoch 1/500
713/713 [==============================] - 4s 5ms/step - loss: 0.0839 - val_loss: 0.0221
Epoch 2/500
713/713 [==============================] - 0s 372us/step - loss: 0.0275 - val_loss: 0.0223
Epoch 3/500
713/713 [==============================] - 0s 378us/step - loss: 0.0283 - val_loss: 0.0238
Epoch 4/500
713/713 [==============================] - 0s 348us/step - loss: 0.0290 - val_loss: 0.0217
Epoch 5/500
713/713 [==============================] - 0s 358us/step - loss: 0.0262 - val_loss: 0.0224
Epoch 6/500
713/713 [==============================] - 0s 361us/step - loss: 0.0266 - val_loss: 0.0255
Epoch 7/500
713/713 [==============================] - 0s 384us/step - loss: 0.0297 - val_loss: 0.0249
Epoch 8/500
713/713 [==============================] - 0s 387us/step - loss: 0.0283 - val_loss: 0.0237
Epoch 9/500
713/713 [==============================] - 0s 361us/step - loss: 0.0268 - val_loss: 0.0223
Epoch 10/500
713/713 [==============================] - 0s 373us/step - loss: 0.0264 - val_loss: 0.0232
Epoch 11/500
713/713 [==============================] - 0s 369us/step - loss: 0.0270 - val_loss: 0.0241
Epoch 12/500
713/713 [==============================] - 0s 367us/step - loss: 0.0279 - val_loss: 0.0251
Epoch 13/500
713/713 [==============================] - 0s 360us/step - loss: 0.0286 - val_loss: 0.0241
Epoch 14/500
713/713 [==============================] - 0s 372us/step - loss: 0.0273 - val_loss: 0.0227
Epoch 15/500
713/713 [==============================] - 0s 374us/step - loss: 0.0264 - val_loss: 0.0222
Epoch 16/500
713/713 [==============================] - 0s 369us/step - loss: 0.0263 - val_loss: 0.0236
Epoch 17/500
713/713 [==============================] - 0s 357us/step - loss: 0.0265 - val_loss: 0.0218
Epoch 18/500
713/713 [==============================] - 0s 374us/step - loss: 0.0262 - val_loss: 0.0219
Epoch 19/500
713/713 [==============================] - 0s 351us/step - loss: 0.0262 - val_loss: 0.0216
Epoch 20/500
713/713 [==============================] - 0s 346us/step - loss: 0.0265 - val_loss: 0.0219
Epoch 21/500
713/713 [==============================] - 0s 348us/step - loss: 0.0283 - val_loss: 0.0262
Epoch 22/500
713/713 [==============================] - 0s 384us/step - loss: 0.0316 - val_loss: 0.0216
Epoch 23/500
713/713 [==============================] - 0s 369us/step - loss: 0.0266 - val_loss: 0.0221
Epoch 24/500
713/713 [==============================] - 0s 367us/step - loss: 0.0274 - val_loss: 0.0217
Epoch 25/500
713/713 [==============================] - 0s 374us/step - loss: 0.0267 - val_loss: 0.0216
Epoch 26/500
713/713 [==============================] - 0s 381us/step - loss: 0.0268 - val_loss: 0.0233
Epoch 27/500
713/713 [==============================] - 0s 355us/step - loss: 0.0296 - val_loss: 0.0227
Epoch 28/500
713/713 [==============================] - 0s 355us/step - loss: 0.0280 - val_loss: 0.0217
Epoch 29/500
713/713 [==============================] - 0s 376us/step - loss: 0.0262 - val_loss: 0.0223
Epoch 30/500
713/713 [==============================] - 0s 370us/step - loss: 0.0263 - val_loss: 0.0228
Epoch 31/500
713/713 [==============================] - 0s 371us/step - loss: 0.0269 - val_loss: 0.0256
Epoch 32/500
713/713 [==============================] - 0s 362us/step - loss: 0.0295 - val_loss: 0.0239
Epoch 33/500
713/713 [==============================] - 0s 353us/step - loss: 0.0276 - val_loss: 0.0239
Epoch 34/500
713/713 [==============================] - 0s 367us/step - loss: 0.0269 - val_loss: 0.0222
Epoch 35/500
713/713 [==============================] - 0s 354us/step - loss: 0.0263 - val_loss: 0.0228
Epoch 36/500
713/713 [==============================] - 0s 361us/step - loss: 0.0268 - val_loss: 0.0244
Epoch 37/500
713/713 [==============================] - 0s 350us/step - loss: 0.0278 - val_loss: 0.0236
Epoch 38/500
713/713 [==============================] - 0s 353us/step - loss: 0.0268 - val_loss: 0.0224
Epoch 39/500
713/713 [==============================] - 0s 386us/step - loss: 0.0262 - val_loss: 0.0218
Epoch 40/500
713/713 [==============================] - 0s 384us/step - loss: 0.0262 - val_loss: 0.0216
Epoch 41/500
713/713 [==============================] - 0s 368us/step - loss: 0.0264 - val_loss: 0.0218
Epoch 42/500
713/713 [==============================] - 0s 386us/step - loss: 0.0274 - val_loss: 0.0232
Epoch 43/500
713/713 [==============================] - 0s 353us/step - loss: 0.0285 - val_loss: 0.0216
Epoch 44/500
713/713 [==============================] - 0s 372us/step - loss: 0.0264 - val_loss: 0.0221
Epoch 45/500
713/713 [==============================] - 0s 372us/step - loss: 0.0264 - val_loss: 0.0246
Epoch 46/500
713/713 [==============================] - 0s 372us/step - loss: 0.0275 - val_loss: 0.0228
Epoch 47/500
713/713 [==============================] - 0s 379us/step - loss: 0.0267 - val_loss: 0.0238
Epoch 48/500
713/713 [==============================] - 0s 378us/step - loss: 0.0267 - val_loss: 0.0220
Epoch 49/500
713/713 [==============================] - 0s 385us/step - loss: 0.0262 - val_loss: 0.0226
Epoch 50/500
713/713 [==============================] - 0s 373us/step - loss: 0.0265 - val_loss: 0.0241
Epoch 51/500
713/713 [==============================] - 0s 356us/step - loss: 0.0270 - val_loss: 0.0227
Epoch 52/500
713/713 [==============================] - 0s 360us/step - loss: 0.0269 - val_loss: 0.0261
Epoch 53/500
713/713 [==============================] - 0s 365us/step - loss: 0.0290 - val_loss: 0.0230
Epoch 54/500
713/713 [==============================] - 0s 376us/step - loss: 0.0264 - val_loss: 0.0219
Epoch 55/500
713/713 [==============================] - 0s 379us/step - loss: 0.0262 - val_loss: 0.0218
Epoch 56/500
713/713 [==============================] - 0s 356us/step - loss: 0.0262 - val_loss: 0.0218
Epoch 57/500
713/713 [==============================] - 0s 355us/step - loss: 0.0262 - val_loss: 0.0221
Epoch 58/500
713/713 [==============================] - 0s 363us/step - loss: 0.0262 - val_loss: 0.0218
Epoch 59/500
713/713 [==============================] - 0s 368us/step - loss: 0.0271 - val_loss: 0.0226
Epoch 60/500
713/713 [==============================] - 0s 374us/step - loss: 0.0284 - val_loss: 0.0223
Epoch 61/500
713/713 [==============================] - 0s 380us/step - loss: 0.0282 - val_loss: 0.0223
Epoch 62/500
713/713 [==============================] - 0s 356us/step - loss: 0.0270 - val_loss: 0.0235
Epoch 63/500
713/713 [==============================] - 0s 374us/step - loss: 0.0267 - val_loss: 0.0221
Epoch 64/500
713/713 [==============================] - 0s 379us/step - loss: 0.0262 - val_loss: 0.0216
Epoch 65/500
713/713 [==============================] - 0s 356us/step - loss: 0.0271 - val_loss: 0.0230
Epoch 66/500
713/713 [==============================] - 0s 355us/step - loss: 0.0280 - val_loss: 0.0221
Epoch 67/500
713/713 [==============================] - 0s 377us/step - loss: 0.0262 - val_loss: 0.0221
Epoch 68/500
713/713 [==============================] - 0s 359us/step - loss: 0.0262 - val_loss: 0.0216
Epoch 69/500
713/713 [==============================] - 0s 375us/step - loss: 0.0266 - val_loss: 0.0221
Epoch 70/500
713/713 [==============================] - 0s 379us/step - loss: 0.0278 - val_loss: 0.0221
Epoch 71/500
713/713 [==============================] - 0s 357us/step - loss: 0.0274 - val_loss: 0.0217
Epoch 72/500
713/713 [==============================] - 0s 359us/step - loss: 0.0265 - val_loss: 0.0219
Epoch 73/500
713/713 [==============================] - 0s 346us/step - loss: 0.0262 - val_loss: 0.0219
Epoch 74/500
713/713 [==============================] - 0s 359us/step - loss: 0.0265 - val_loss: 0.0284
Epoch 75/500
713/713 [==============================] - 0s 383us/step - loss: 0.0300 - val_loss: 0.0223
Epoch 76/500
713/713 [==============================] - 0s 344us/step - loss: 0.0262 - val_loss: 0.0217
Epoch 77/500
713/713 [==============================] - 0s 365us/step - loss: 0.0266 - val_loss: 0.0217
Epoch 78/500
713/713 [==============================] - 0s 346us/step - loss: 0.0262 - val_loss: 0.0218
Epoch 79/500
713/713 [==============================] - 0s 365us/step - loss: 0.0262 - val_loss: 0.0216
Epoch 80/500
713/713 [==============================] - 0s 385us/step - loss: 0.0264 - val_loss: 0.0216
Epoch 81/500
713/713 [==============================] - 0s 364us/step - loss: 0.0264 - val_loss: 0.0216
Epoch 82/500
713/713 [==============================] - 0s 361us/step - loss: 0.0275 - val_loss: 0.0239
Epoch 83/500
713/713 [==============================] - 0s 371us/step - loss: 0.0292 - val_loss: 0.0217
Epoch 84/500
713/713 [==============================] - 0s 367us/step - loss: 0.0262 - val_loss: 0.0216
Epoch 85/500
713/713 [==============================] - 0s 397us/step - loss: 0.0263 - val_loss: 0.0218
Epoch 86/500
713/713 [==============================] - 0s 378us/step - loss: 0.0263 - val_loss: 0.0253
Epoch 87/500
713/713 [==============================] - 0s 385us/step - loss: 0.0276 - val_loss: 0.0220
Epoch 88/500
713/713 [==============================] - 0s 358us/step - loss: 0.0263 - val_loss: 0.0235
Epoch 89/500
713/713 [==============================] - 0s 345us/step - loss: 0.0276 - val_loss: 0.0246
Epoch 90/500
713/713 [==============================] - 0s 354us/step - loss: 0.0280 - val_loss: 0.0231
Epoch 91/500
713/713 [==============================] - 0s 351us/step - loss: 0.0273 - val_loss: 0.0243
Epoch 92/500
713/713 [==============================] - 0s 378us/step - loss: 0.0275 - val_loss: 0.0227
Epoch 93/500
713/713 [==============================] - 0s 350us/step - loss: 0.0262 - val_loss: 0.0216
Epoch 94/500
713/713 [==============================] - 0s 359us/step - loss: 0.0265 - val_loss: 0.0217
Epoch 95/500
713/713 [==============================] - 0s 376us/step - loss: 0.0261 - val_loss: 0.0222
Epoch 96/500
713/713 [==============================] - 0s 361us/step - loss: 0.0266 - val_loss: 0.0253
Epoch 97/500
713/713 [==============================] - 0s 363us/step - loss: 0.0273 - val_loss: 0.0217
Epoch 98/500
713/713 [==============================] - 0s 368us/step - loss: 0.0261 - val_loss: 0.0222
Epoch 99/500
713/713 [==============================] - 0s 376us/step - loss: 0.0262 - val_loss: 0.0224
Epoch 100/500
713/713 [==============================] - 0s 382us/step - loss: 0.0265 - val_loss: 0.0240
Epoch 101/500
713/713 [==============================] - 0s 366us/step - loss: 0.0270 - val_loss: 0.0225
Epoch 102/500
713/713 [==============================] - 0s 366us/step - loss: 0.0263 - val_loss: 0.0220
Epoch 103/500
713/713 [==============================] - 0s 370us/step - loss: 0.0261 - val_loss: 0.0216
Epoch 104/500
713/713 [==============================] - 0s 360us/step - loss: 0.0261 - val_loss: 0.0223
Epoch 105/500
713/713 [==============================] - 0s 364us/step - loss: 0.0261 - val_loss: 0.0216
Epoch 106/500
713/713 [==============================] - 0s 384us/step - loss: 0.0269 - val_loss: 0.0226
Epoch 107/500
713/713 [==============================] - 0s 358us/step - loss: 0.0286 - val_loss: 0.0223
Epoch 108/500
713/713 [==============================] - 0s 378us/step - loss: 0.0273 - val_loss: 0.0221
Epoch 109/500
713/713 [==============================] - 0s 366us/step - loss: 0.0262 - val_loss: 0.0221
Epoch 110/500
713/713 [==============================] - 0s 364us/step - loss: 0.0261 - val_loss: 0.0215
Epoch 111/500
713/713 [==============================] - 0s 353us/step - loss: 0.0263 - val_loss: 0.0220
Epoch 112/500
713/713 [==============================] - 0s 359us/step - loss: 0.0261 - val_loss: 0.0215
Epoch 113/500
713/713 [==============================] - 0s 368us/step - loss: 0.0280 - val_loss: 0.0235
Epoch 114/500
713/713 [==============================] - 0s 361us/step - loss: 0.0287 - val_loss: 0.0224
Epoch 115/500
713/713 [==============================] - 0s 368us/step - loss: 0.0262 - val_loss: 0.0216
Epoch 116/500
713/713 [==============================] - 0s 367us/step - loss: 0.0263 - val_loss: 0.0217
Epoch 117/500
713/713 [==============================] - 0s 352us/step - loss: 0.0266 - val_loss: 0.0221
Epoch 118/500
713/713 [==============================] - 0s 383us/step - loss: 0.0261 - val_loss: 0.0220
Epoch 119/500
713/713 [==============================] - 0s 380us/step - loss: 0.0268 - val_loss: 0.0275
Epoch 120/500
713/713 [==============================] - 0s 382us/step - loss: 0.0295 - val_loss: 0.0221
Epoch 121/500
713/713 [==============================] - 0s 356us/step - loss: 0.0262 - val_loss: 0.0220
Epoch 122/500
713/713 [==============================] - 0s 368us/step - loss: 0.0261 - val_loss: 0.0220
Epoch 123/500
713/713 [==============================] - 0s 357us/step - loss: 0.0262 - val_loss: 0.0226
Epoch 124/500
713/713 [==============================] - 0s 372us/step - loss: 0.0264 - val_loss: 0.0229
Epoch 125/500
713/713 [==============================] - 0s 368us/step - loss: 0.0267 - val_loss: 0.0235
Epoch 126/500
713/713 [==============================] - 0s 348us/step - loss: 0.0275 - val_loss: 0.0242
Epoch 127/500
713/713 [==============================] - 0s 380us/step - loss: 0.0269 - val_loss: 0.0217
Epoch 128/500
713/713 [==============================] - 0s 362us/step - loss: 0.0261 - val_loss: 0.0215
Epoch 129/500
713/713 [==============================] - 0s 384us/step - loss: 0.0261 - val_loss: 0.0214
Epoch 130/500
713/713 [==============================] - 0s 382us/step - loss: 0.0261 - val_loss: 0.0218
Epoch 131/500
713/713 [==============================] - 0s 348us/step - loss: 0.0261 - val_loss: 0.0230
Epoch 132/500
713/713 [==============================] - 0s 352us/step - loss: 0.0264 - val_loss: 0.0223
Epoch 133/500
713/713 [==============================] - 0s 375us/step - loss: 0.0260 - val_loss: 0.0213
Epoch 134/500
713/713 [==============================] - 0s 357us/step - loss: 0.0269 - val_loss: 0.0225
Epoch 135/500
713/713 [==============================] - 0s 385us/step - loss: 0.0276 - val_loss: 0.0220
Epoch 136/500
713/713 [==============================] - 0s 381us/step - loss: 0.0260 - val_loss: 0.0214
Epoch 137/500
713/713 [==============================] - 0s 358us/step - loss: 0.0264 - val_loss: 0.0213
Epoch 138/500
713/713 [==============================] - 0s 357us/step - loss: 0.0260 - val_loss: 0.0233
Epoch 139/500
713/713 [==============================] - 0s 366us/step - loss: 0.0265 - val_loss: 0.0222
Epoch 140/500
713/713 [==============================] - 0s 373us/step - loss: 0.0261 - val_loss: 0.0227
Epoch 141/500
713/713 [==============================] - 0s 370us/step - loss: 0.0283 - val_loss: 0.0213
Epoch 142/500
713/713 [==============================] - 0s 359us/step - loss: 0.0260 - val_loss: 0.0230
Epoch 143/500
713/713 [==============================] - 0s 384us/step - loss: 0.0266 - val_loss: 0.0224
Epoch 144/500
713/713 [==============================] - 0s 361us/step - loss: 0.0260 - val_loss: 0.0216
Epoch 145/500
713/713 [==============================] - 0s 370us/step - loss: 0.0269 - val_loss: 0.0212
Epoch 146/500
713/713 [==============================] - 0s 355us/step - loss: 0.0263 - val_loss: 0.0214
Epoch 147/500
713/713 [==============================] - 0s 357us/step - loss: 0.0269 - val_loss: 0.0213
Epoch 148/500
713/713 [==============================] - 0s 382us/step - loss: 0.0268 - val_loss: 0.0214
Epoch 149/500
713/713 [==============================] - 0s 360us/step - loss: 0.0267 - val_loss: 0.0212
Epoch 150/500
713/713 [==============================] - 0s 373us/step - loss: 0.0261 - val_loss: 0.0211
Epoch 151/500
713/713 [==============================] - 0s 375us/step - loss: 0.0262 - val_loss: 0.0212
Epoch 152/500
713/713 [==============================] - 0s 363us/step - loss: 0.0260 - val_loss: 0.0211
Epoch 153/500
713/713 [==============================] - 0s 377us/step - loss: 0.0259 - val_loss: 0.0217
Epoch 154/500
713/713 [==============================] - 0s 359us/step - loss: 0.0259 - val_loss: 0.0216
Epoch 155/500
713/713 [==============================] - 0s 363us/step - loss: 0.0259 - val_loss: 0.0228
Epoch 156/500
713/713 [==============================] - 0s 387us/step - loss: 0.0261 - val_loss: 0.0215
Epoch 157/500
713/713 [==============================] - 0s 358us/step - loss: 0.0259 - val_loss: 0.0236
Epoch 158/500
713/713 [==============================] - 0s 369us/step - loss: 0.0277 - val_loss: 0.0235
Epoch 159/500
713/713 [==============================] - 0s 368us/step - loss: 0.0268 - val_loss: 0.0219
Epoch 160/500
713/713 [==============================] - 0s 359us/step - loss: 0.0258 - val_loss: 0.0210
Epoch 161/500
713/713 [==============================] - 0s 364us/step - loss: 0.0257 - val_loss: 0.0215
Epoch 162/500
713/713 [==============================] - 0s 404us/step - loss: 0.0256 - val_loss: 0.0207
Epoch 163/500
713/713 [==============================] - 0s 377us/step - loss: 0.0256 - val_loss: 0.0213
Epoch 164/500
713/713 [==============================] - 0s 342us/step - loss: 0.0255 - val_loss: 0.0207
Epoch 165/500
713/713 [==============================] - 0s 364us/step - loss: 0.0255 - val_loss: 0.0205
Epoch 166/500
713/713 [==============================] - 0s 378us/step - loss: 0.0254 - val_loss: 0.0269
Epoch 167/500
713/713 [==============================] - 0s 363us/step - loss: 0.0287 - val_loss: 0.0205
Epoch 168/500
713/713 [==============================] - 0s 365us/step - loss: 0.0253 - val_loss: 0.0202
Epoch 169/500
713/713 [==============================] - 0s 352us/step - loss: 0.0257 - val_loss: 0.0200
Epoch 170/500
713/713 [==============================] - 0s 362us/step - loss: 0.0254 - val_loss: 0.0201
Epoch 171/500
713/713 [==============================] - 0s 355us/step - loss: 0.0250 - val_loss: 0.0210
Epoch 172/500
713/713 [==============================] - 0s 389us/step - loss: 0.0257 - val_loss: 0.0232
Epoch 173/500
713/713 [==============================] - 0s 386us/step - loss: 0.0260 - val_loss: 0.0198
Epoch 174/500
713/713 [==============================] - 0s 365us/step - loss: 0.0247 - val_loss: 0.0193
Epoch 175/500
713/713 [==============================] - 0s 366us/step - loss: 0.0246 - val_loss: 0.0199
Epoch 176/500
713/713 [==============================] - 0s 355us/step - loss: 0.0248 - val_loss: 0.0230
Epoch 177/500
713/713 [==============================] - 0s 388us/step - loss: 0.0264 - val_loss: 0.0198
Epoch 178/500
713/713 [==============================] - 0s 371us/step - loss: 0.0240 - val_loss: 0.0181
Epoch 179/500
713/713 [==============================] - 0s 369us/step - loss: 0.0237 - val_loss: 0.0181
Epoch 180/500
713/713 [==============================] - 0s 367us/step - loss: 0.0239 - val_loss: 0.0178
Epoch 181/500
713/713 [==============================] - 0s 350us/step - loss: 0.0242 - val_loss: 0.0171
Epoch 182/500
713/713 [==============================] - 0s 352us/step - loss: 0.0231 - val_loss: 0.0171
Epoch 183/500
713/713 [==============================] - 0s 382us/step - loss: 0.0233 - val_loss: 0.0162
Epoch 184/500
713/713 [==============================] - 0s 347us/step - loss: 0.0222 - val_loss: 0.0206
Epoch 185/500
713/713 [==============================] - 0s 364us/step - loss: 0.0246 - val_loss: 0.0182
Epoch 186/500
713/713 [==============================] - 0s 359us/step - loss: 0.0229 - val_loss: 0.0182
Epoch 187/500
713/713 [==============================] - 0s 353us/step - loss: 0.0227 - val_loss: 0.0169
Epoch 188/500
713/713 [==============================] - 0s 390us/step - loss: 0.0209 - val_loss: 0.0152
Epoch 189/500
713/713 [==============================] - 0s 352us/step - loss: 0.0210 - val_loss: 0.0146
Epoch 190/500
713/713 [==============================] - 0s 371us/step - loss: 0.0201 - val_loss: 0.0157
Epoch 191/500
713/713 [==============================] - 0s 350us/step - loss: 0.0207 - val_loss: 0.0206
Epoch 192/500
713/713 [==============================] - 0s 359us/step - loss: 0.0226 - val_loss: 0.0142
Epoch 193/500
713/713 [==============================] - 0s 360us/step - loss: 0.0190 - val_loss: 0.0140
Epoch 194/500
713/713 [==============================] - 0s 380us/step - loss: 0.0203 - val_loss: 0.0153
Epoch 195/500
713/713 [==============================] - 0s 351us/step - loss: 0.0207 - val_loss: 0.0131
Epoch 196/500
713/713 [==============================] - 0s 367us/step - loss: 0.0182 - val_loss: 0.0130
Epoch 197/500
713/713 [==============================] - 0s 369us/step - loss: 0.0187 - val_loss: 0.0142
Epoch 198/500
713/713 [==============================] - 0s 380us/step - loss: 0.0194 - val_loss: 0.0127
Epoch 199/500
713/713 [==============================] - 0s 421us/step - loss: 0.0188 - val_loss: 0.0153
Epoch 200/500
713/713 [==============================] - 0s 368us/step - loss: 0.0214 - val_loss: 0.0132
Epoch 201/500
713/713 [==============================] - 0s 363us/step - loss: 0.0182 - val_loss: 0.0128
Epoch 202/500
713/713 [==============================] - 0s 358us/step - loss: 0.0176 - val_loss: 0.0137
Epoch 203/500
713/713 [==============================] - 0s 368us/step - loss: 0.0176 - val_loss: 0.0132
Epoch 204/500
713/713 [==============================] - 0s 351us/step - loss: 0.0183 - val_loss: 0.0138
Epoch 205/500
713/713 [==============================] - 0s 351us/step - loss: 0.0190 - val_loss: 0.0139
Epoch 206/500
713/713 [==============================] - 0s 359us/step - loss: 0.0193 - val_loss: 0.0134
Epoch 207/500
713/713 [==============================] - 0s 347us/step - loss: 0.0190 - val_loss: 0.0137
Epoch 208/500
713/713 [==============================] - 0s 351us/step - loss: 0.0182 - val_loss: 0.0119
Epoch 209/500
713/713 [==============================] - 0s 350us/step - loss: 0.0167 - val_loss: 0.0126
Epoch 210/500
713/713 [==============================] - 0s 354us/step - loss: 0.0170 - val_loss: 0.0122
Epoch 211/500
713/713 [==============================] - 0s 353us/step - loss: 0.0171 - val_loss: 0.0130
Epoch 212/500
713/713 [==============================] - 0s 352us/step - loss: 0.0181 - val_loss: 0.0140
Epoch 213/500
713/713 [==============================] - 0s 358us/step - loss: 0.0187 - val_loss: 0.0135
Epoch 214/500
713/713 [==============================] - 0s 361us/step - loss: 0.0177 - val_loss: 0.0121
Epoch 215/500
713/713 [==============================] - 0s 361us/step - loss: 0.0164 - val_loss: 0.0170
Epoch 216/500
713/713 [==============================] - 0s 387us/step - loss: 0.0201 - val_loss: 0.0126
Epoch 217/500
713/713 [==============================] - 0s 371us/step - loss: 0.0163 - val_loss: 0.0123
Epoch 218/500
713/713 [==============================] - 0s 344us/step - loss: 0.0165 - val_loss: 0.0139
Epoch 219/500
713/713 [==============================] - 0s 345us/step - loss: 0.0166 - val_loss: 0.0117
Epoch 220/500
713/713 [==============================] - 0s 376us/step - loss: 0.0157 - val_loss: 0.0130
Epoch 221/500
713/713 [==============================] - 0s 355us/step - loss: 0.0174 - val_loss: 0.0120
Epoch 222/500
713/713 [==============================] - 0s 377us/step - loss: 0.0165 - val_loss: 0.0115
Epoch 223/500
713/713 [==============================] - 0s 376us/step - loss: 0.0156 - val_loss: 0.0112
Epoch 224/500
713/713 [==============================] - 0s 364us/step - loss: 0.0154 - val_loss: 0.0158
Epoch 225/500
713/713 [==============================] - 0s 369us/step - loss: 0.0213 - val_loss: 0.0178
Epoch 226/500
713/713 [==============================] - 0s 364us/step - loss: 0.0200 - val_loss: 0.0117
Epoch 227/500
713/713 [==============================] - 0s 366us/step - loss: 0.0155 - val_loss: 0.0135
Epoch 228/500
713/713 [==============================] - 0s 359us/step - loss: 0.0165 - val_loss: 0.0126
Epoch 229/500
713/713 [==============================] - 0s 363us/step - loss: 0.0160 - val_loss: 0.0135
Epoch 230/500
713/713 [==============================] - 0s 362us/step - loss: 0.0181 - val_loss: 0.0144
Epoch 231/500
713/713 [==============================] - 0s 370us/step - loss: 0.0175 - val_loss: 0.0123
Epoch 232/500
713/713 [==============================] - 0s 389us/step - loss: 0.0158 - val_loss: 0.0120
Epoch 233/500
713/713 [==============================] - 0s 388us/step - loss: 0.0157 - val_loss: 0.0139
Epoch 234/500
713/713 [==============================] - 0s 366us/step - loss: 0.0164 - val_loss: 0.0117
Epoch 235/500
713/713 [==============================] - 0s 354us/step - loss: 0.0152 - val_loss: 0.0133
Epoch 236/500
713/713 [==============================] - 0s 361us/step - loss: 0.0179 - val_loss: 0.0184
Epoch 237/500
713/713 [==============================] - 0s 391us/step - loss: 0.0211 - val_loss: 0.0119
Epoch 238/500
713/713 [==============================] - 0s 357us/step - loss: 0.0153 - val_loss: 0.0112
Epoch 239/500
713/713 [==============================] - 0s 353us/step - loss: 0.0150 - val_loss: 0.0119
Epoch 240/500
713/713 [==============================] - 0s 394us/step - loss: 0.0153 - val_loss: 0.0117
Epoch 241/500
713/713 [==============================] - 0s 342us/step - loss: 0.0152 - val_loss: 0.0116
Epoch 242/500
713/713 [==============================] - 0s 376us/step - loss: 0.0162 - val_loss: 0.0129
Epoch 243/500
713/713 [==============================] - 0s 364us/step - loss: 0.0167 - val_loss: 0.0113
Epoch 244/500
713/713 [==============================] - 0s 360us/step - loss: 0.0163 - val_loss: 0.0188
Epoch 245/500
713/713 [==============================] - 0s 375us/step - loss: 0.0210 - val_loss: 0.0119
Epoch 246/500
713/713 [==============================] - 0s 362us/step - loss: 0.0152 - val_loss: 0.0114
Epoch 247/500
713/713 [==============================] - 0s 376us/step - loss: 0.0149 - val_loss: 0.0118
Epoch 248/500
713/713 [==============================] - 0s 365us/step - loss: 0.0156 - val_loss: 0.0136
Epoch 249/500
713/713 [==============================] - 0s 350us/step - loss: 0.0164 - val_loss: 0.0110
Epoch 250/500
713/713 [==============================] - 0s 365us/step - loss: 0.0150 - val_loss: 0.0124
Epoch 251/500
713/713 [==============================] - 0s 360us/step - loss: 0.0170 - val_loss: 0.0145
Epoch 252/500
713/713 [==============================] - 0s 387us/step - loss: 0.0176 - val_loss: 0.0121
Epoch 253/500
713/713 [==============================] - 0s 371us/step - loss: 0.0154 - val_loss: 0.0120
Epoch 254/500
713/713 [==============================] - 0s 370us/step - loss: 0.0150 - val_loss: 0.0115
Epoch 255/500
713/713 [==============================] - 0s 367us/step - loss: 0.0147 - val_loss: 0.0112
Epoch 256/500
713/713 [==============================] - 0s 359us/step - loss: 0.0147 - val_loss: 0.0135
Epoch 257/500
713/713 [==============================] - 0s 351us/step - loss: 0.0165 - val_loss: 0.0124
Epoch 258/500
713/713 [==============================] - 0s 367us/step - loss: 0.0164 - val_loss: 0.0150
Epoch 259/500
713/713 [==============================] - 0s 374us/step - loss: 0.0187 - val_loss: 0.0153
Epoch 260/500
713/713 [==============================] - 0s 372us/step - loss: 0.0170 - val_loss: 0.0113
Epoch 261/500
713/713 [==============================] - 0s 370us/step - loss: 0.0147 - val_loss: 0.0115
Epoch 262/500
713/713 [==============================] - 0s 402us/step - loss: 0.0150 - val_loss: 0.0122
Epoch 263/500
713/713 [==============================] - 0s 363us/step - loss: 0.0154 - val_loss: 0.0117
Epoch 264/500
713/713 [==============================] - 0s 353us/step - loss: 0.0148 - val_loss: 0.0124
Epoch 265/500
713/713 [==============================] - 0s 362us/step - loss: 0.0161 - val_loss: 0.0168
Epoch 266/500
713/713 [==============================] - 0s 367us/step - loss: 0.0194 - val_loss: 0.0126
Epoch 267/500
713/713 [==============================] - 0s 378us/step - loss: 0.0163 - val_loss: 0.0122
Epoch 268/500
713/713 [==============================] - 0s 352us/step - loss: 0.0164 - val_loss: 0.0112
Epoch 269/500
713/713 [==============================] - 0s 373us/step - loss: 0.0146 - val_loss: 0.0113
Epoch 270/500
713/713 [==============================] - 0s 392us/step - loss: 0.0150 - val_loss: 0.0126
Epoch 271/500
713/713 [==============================] - 0s 379us/step - loss: 0.0160 - val_loss: 0.0128
Epoch 272/500
713/713 [==============================] - 0s 351us/step - loss: 0.0167 - val_loss: 0.0137
Epoch 273/500
713/713 [==============================] - 0s 347us/step - loss: 0.0166 - val_loss: 0.0121
Epoch 274/500
713/713 [==============================] - 0s 360us/step - loss: 0.0166 - val_loss: 0.0135
Epoch 275/500
713/713 [==============================] - 0s 358us/step - loss: 0.0169 - val_loss: 0.0110
Epoch 276/500
713/713 [==============================] - 0s 361us/step - loss: 0.0146 - val_loss: 0.0122
Epoch 277/500
713/713 [==============================] - 0s 356us/step - loss: 0.0149 - val_loss: 0.0116
Epoch 278/500
713/713 [==============================] - 0s 369us/step - loss: 0.0146 - val_loss: 0.0117
Epoch 279/500
713/713 [==============================] - 0s 369us/step - loss: 0.0150 - val_loss: 0.0124
Epoch 280/500
713/713 [==============================] - 0s 357us/step - loss: 0.0158 - val_loss: 0.0131
Epoch 281/500
713/713 [==============================] - 0s 353us/step - loss: 0.0163 - val_loss: 0.0125
Epoch 282/500
713/713 [==============================] - 0s 372us/step - loss: 0.0159 - val_loss: 0.0123
Epoch 283/500
713/713 [==============================] - 0s 388us/step - loss: 0.0152 - val_loss: 0.0120
Epoch 284/500
713/713 [==============================] - 0s 356us/step - loss: 0.0149 - val_loss: 0.0131
Epoch 285/500
713/713 [==============================] - 0s 372us/step - loss: 0.0153 - val_loss: 0.0128
Epoch 286/500
713/713 [==============================] - 0s 353us/step - loss: 0.0156 - val_loss: 0.0121
Epoch 287/500
713/713 [==============================] - 0s 353us/step - loss: 0.0154 - val_loss: 0.0136
Epoch 288/500
713/713 [==============================] - 0s 388us/step - loss: 0.0166 - val_loss: 0.0144
Epoch 289/500
713/713 [==============================] - 0s 375us/step - loss: 0.0171 - val_loss: 0.0113
Epoch 290/500
713/713 [==============================] - 0s 386us/step - loss: 0.0149 - val_loss: 0.0120
Epoch 291/500
713/713 [==============================] - 0s 365us/step - loss: 0.0167 - val_loss: 0.0125
Epoch 292/500
713/713 [==============================] - 0s 360us/step - loss: 0.0167 - val_loss: 0.0109
Epoch 293/500
713/713 [==============================] - 0s 378us/step - loss: 0.0148 - val_loss: 0.0142
Epoch 294/500
713/713 [==============================] - 0s 375us/step - loss: 0.0174 - val_loss: 0.0123
Epoch 295/500
713/713 [==============================] - 0s 358us/step - loss: 0.0160 - val_loss: 0.0123
Epoch 296/500
713/713 [==============================] - 0s 379us/step - loss: 0.0154 - val_loss: 0.0109
Epoch 297/500
713/713 [==============================] - 0s 352us/step - loss: 0.0143 - val_loss: 0.0112
Epoch 298/500
713/713 [==============================] - 0s 388us/step - loss: 0.0145 - val_loss: 0.0115
Epoch 299/500
713/713 [==============================] - 0s 376us/step - loss: 0.0152 - val_loss: 0.0116
Epoch 300/500
713/713 [==============================] - 0s 382us/step - loss: 0.0155 - val_loss: 0.0157
Epoch 301/500
713/713 [==============================] - 0s 368us/step - loss: 0.0179 - val_loss: 0.0117
Epoch 302/500
713/713 [==============================] - 0s 373us/step - loss: 0.0143 - val_loss: 0.0125
Epoch 303/500
713/713 [==============================] - 0s 393us/step - loss: 0.0170 - val_loss: 0.0113
Epoch 304/500
713/713 [==============================] - 0s 363us/step - loss: 0.0154 - val_loss: 0.0116
Epoch 305/500
713/713 [==============================] - 0s 363us/step - loss: 0.0155 - val_loss: 0.0141
Epoch 306/500
713/713 [==============================] - 0s 358us/step - loss: 0.0164 - val_loss: 0.0113
Epoch 307/500
713/713 [==============================] - 0s 360us/step - loss: 0.0148 - val_loss: 0.0133
Epoch 308/500
713/713 [==============================] - 0s 367us/step - loss: 0.0161 - val_loss: 0.0122
Epoch 309/500
713/713 [==============================] - 0s 372us/step - loss: 0.0147 - val_loss: 0.0113
Epoch 310/500
713/713 [==============================] - 0s 357us/step - loss: 0.0141 - val_loss: 0.0118
Epoch 311/500
713/713 [==============================] - 0s 351us/step - loss: 0.0151 - val_loss: 0.0129
Epoch 312/500
713/713 [==============================] - 0s 363us/step - loss: 0.0160 - val_loss: 0.0128
Epoch 313/500
713/713 [==============================] - 0s 360us/step - loss: 0.0153 - val_loss: 0.0113
Epoch 314/500
713/713 [==============================] - 0s 381us/step - loss: 0.0140 - val_loss: 0.0111
Epoch 315/500
713/713 [==============================] - 0s 364us/step - loss: 0.0142 - val_loss: 0.0133
Epoch 316/500
713/713 [==============================] - 0s 377us/step - loss: 0.0158 - val_loss: 0.0139
Epoch 317/500
713/713 [==============================] - 0s 355us/step - loss: 0.0176 - val_loss: 0.0134
Epoch 318/500
713/713 [==============================] - 0s 359us/step - loss: 0.0154 - val_loss: 0.0113
Epoch 319/500
713/713 [==============================] - 0s 375us/step - loss: 0.0141 - val_loss: 0.0110
Epoch 320/500
713/713 [==============================] - 0s 353us/step - loss: 0.0144 - val_loss: 0.0155
Epoch 321/500
713/713 [==============================] - 0s 388us/step - loss: 0.0179 - val_loss: 0.0119
Epoch 322/500
713/713 [==============================] - 0s 353us/step - loss: 0.0152 - val_loss: 0.0115
Epoch 323/500
713/713 [==============================] - 0s 364us/step - loss: 0.0150 - val_loss: 0.0107
Epoch 324/500
713/713 [==============================] - 0s 371us/step - loss: 0.0139 - val_loss: 0.0119
Epoch 325/500
713/713 [==============================] - 0s 377us/step - loss: 0.0144 - val_loss: 0.0112
Epoch 326/500
713/713 [==============================] - 0s 375us/step - loss: 0.0142 - val_loss: 0.0125
Epoch 327/500
713/713 [==============================] - 0s 363us/step - loss: 0.0155 - val_loss: 0.0119
Epoch 328/500
713/713 [==============================] - 0s 355us/step - loss: 0.0163 - val_loss: 0.0140
Epoch 329/500
713/713 [==============================] - 0s 355us/step - loss: 0.0169 - val_loss: 0.0111
Epoch 330/500
713/713 [==============================] - 0s 366us/step - loss: 0.0150 - val_loss: 0.0121
Epoch 331/500
713/713 [==============================] - 0s 378us/step - loss: 0.0151 - val_loss: 0.0106
Epoch 332/500
713/713 [==============================] - 0s 357us/step - loss: 0.0138 - val_loss: 0.0108
Epoch 333/500
713/713 [==============================] - 0s 368us/step - loss: 0.0140 - val_loss: 0.0110
Epoch 334/500
713/713 [==============================] - 0s 357us/step - loss: 0.0140 - val_loss: 0.0112
Epoch 335/500
713/713 [==============================] - 0s 359us/step - loss: 0.0139 - val_loss: 0.0121
Epoch 336/500
713/713 [==============================] - 0s 355us/step - loss: 0.0158 - val_loss: 0.0138
Epoch 337/500
713/713 [==============================] - 0s 399us/step - loss: 0.0162 - val_loss: 0.0136
Epoch 338/500
713/713 [==============================] - 0s 407us/step - loss: 0.0158 - val_loss: 0.0123
Epoch 339/500
713/713 [==============================] - 0s 375us/step - loss: 0.0152 - val_loss: 0.0130
Epoch 340/500
713/713 [==============================] - 0s 383us/step - loss: 0.0155 - val_loss: 0.0108
Epoch 341/500
713/713 [==============================] - 0s 379us/step - loss: 0.0136 - val_loss: 0.0103
Epoch 342/500
713/713 [==============================] - 0s 382us/step - loss: 0.0135 - val_loss: 0.0119
Epoch 343/500
713/713 [==============================] - 0s 376us/step - loss: 0.0141 - val_loss: 0.0114
Epoch 344/500
713/713 [==============================] - 0s 381us/step - loss: 0.0142 - val_loss: 0.0107
Epoch 345/500
713/713 [==============================] - 0s 358us/step - loss: 0.0139 - val_loss: 0.0119
Epoch 346/500
713/713 [==============================] - 0s 364us/step - loss: 0.0156 - val_loss: 0.0116
Epoch 347/500
713/713 [==============================] - 0s 358us/step - loss: 0.0154 - val_loss: 0.0110
Epoch 348/500
713/713 [==============================] - 0s 364us/step - loss: 0.0142 - val_loss: 0.0105
Epoch 349/500
713/713 [==============================] - 0s 362us/step - loss: 0.0135 - val_loss: 0.0130
Epoch 350/500
713/713 [==============================] - 0s 379us/step - loss: 0.0155 - val_loss: 0.0155
Epoch 351/500
713/713 [==============================] - 0s 397us/step - loss: 0.0174 - val_loss: 0.0113
Epoch 352/500
713/713 [==============================] - 0s 367us/step - loss: 0.0141 - val_loss: 0.0114
Epoch 353/500
713/713 [==============================] - 0s 364us/step - loss: 0.0136 - val_loss: 0.0110
Epoch 354/500
713/713 [==============================] - 0s 364us/step - loss: 0.0140 - val_loss: 0.0114
Epoch 355/500
713/713 [==============================] - 0s 351us/step - loss: 0.0140 - val_loss: 0.0119
Epoch 356/500
713/713 [==============================] - 0s 351us/step - loss: 0.0148 - val_loss: 0.0146
Epoch 357/500
713/713 [==============================] - 0s 372us/step - loss: 0.0166 - val_loss: 0.0116
Epoch 358/500
713/713 [==============================] - 0s 364us/step - loss: 0.0141 - val_loss: 0.0140
Epoch 359/500
713/713 [==============================] - 0s 371us/step - loss: 0.0166 - val_loss: 0.0123
Epoch 360/500
713/713 [==============================] - 0s 356us/step - loss: 0.0145 - val_loss: 0.0106
Epoch 361/500
713/713 [==============================] - 0s 359us/step - loss: 0.0132 - val_loss: 0.0106
Epoch 362/500
713/713 [==============================] - 0s 349us/step - loss: 0.0132 - val_loss: 0.0102
Epoch 363/500
713/713 [==============================] - 0s 374us/step - loss: 0.0130 - val_loss: 0.0112
Epoch 364/500
713/713 [==============================] - 0s 366us/step - loss: 0.0139 - val_loss: 0.0124
Epoch 365/500
713/713 [==============================] - 0s 351us/step - loss: 0.0151 - val_loss: 0.0119
Epoch 366/500
713/713 [==============================] - 0s 387us/step - loss: 0.0154 - val_loss: 0.0159
Epoch 367/500
713/713 [==============================] - 0s 362us/step - loss: 0.0169 - val_loss: 0.0103
Epoch 368/500
713/713 [==============================] - 0s 353us/step - loss: 0.0135 - val_loss: 0.0105
Epoch 369/500
713/713 [==============================] - 0s 357us/step - loss: 0.0135 - val_loss: 0.0115
Epoch 370/500
713/713 [==============================] - 0s 384us/step - loss: 0.0139 - val_loss: 0.0113
Epoch 371/500
713/713 [==============================] - 0s 382us/step - loss: 0.0137 - val_loss: 0.0107
Epoch 372/500
713/713 [==============================] - 0s 385us/step - loss: 0.0132 - val_loss: 0.0110
Epoch 373/500
713/713 [==============================] - 0s 387us/step - loss: 0.0141 - val_loss: 0.0110
Epoch 374/500
713/713 [==============================] - 0s 367us/step - loss: 0.0149 - val_loss: 0.0110
Epoch 375/500
713/713 [==============================] - 0s 388us/step - loss: 0.0148 - val_loss: 0.0124
Epoch 376/500
713/713 [==============================] - 0s 364us/step - loss: 0.0161 - val_loss: 0.0148
Epoch 377/500
713/713 [==============================] - 0s 368us/step - loss: 0.0157 - val_loss: 0.0098
Epoch 378/500
713/713 [==============================] - 0s 377us/step - loss: 0.0129 - val_loss: 0.0113
Epoch 379/500
713/713 [==============================] - 0s 358us/step - loss: 0.0134 - val_loss: 0.0109
Epoch 380/500
713/713 [==============================] - 0s 393us/step - loss: 0.0147 - val_loss: 0.0108
Epoch 381/500
713/713 [==============================] - 0s 359us/step - loss: 0.0148 - val_loss: 0.0126
Epoch 382/500
713/713 [==============================] - 0s 388us/step - loss: 0.0149 - val_loss: 0.0117
Epoch 383/500
713/713 [==============================] - 0s 376us/step - loss: 0.0138 - val_loss: 0.0121
Epoch 384/500
713/713 [==============================] - 0s 359us/step - loss: 0.0142 - val_loss: 0.0106
Epoch 385/500
713/713 [==============================] - 0s 388us/step - loss: 0.0132 - val_loss: 0.0111
Epoch 386/500
713/713 [==============================] - 0s 385us/step - loss: 0.0137 - val_loss: 0.0119
Epoch 387/500
713/713 [==============================] - 0s 366us/step - loss: 0.0147 - val_loss: 0.0121
Epoch 388/500
713/713 [==============================] - 0s 399us/step - loss: 0.0144 - val_loss: 0.0100
Epoch 389/500
713/713 [==============================] - 0s 360us/step - loss: 0.0131 - val_loss: 0.0100
Epoch 390/500
713/713 [==============================] - 0s 357us/step - loss: 0.0127 - val_loss: 0.0098
Epoch 391/500
713/713 [==============================] - 0s 364us/step - loss: 0.0129 - val_loss: 0.0096
Epoch 392/500
713/713 [==============================] - 0s 359us/step - loss: 0.0133 - val_loss: 0.0160
Epoch 393/500
713/713 [==============================] - 0s 363us/step - loss: 0.0178 - val_loss: 0.0094
Epoch 394/500
713/713 [==============================] - 0s 368us/step - loss: 0.0127 - val_loss: 0.0101
Epoch 395/500
713/713 [==============================] - 0s 360us/step - loss: 0.0131 - val_loss: 0.0106
Epoch 396/500
713/713 [==============================] - 0s 366us/step - loss: 0.0131 - val_loss: 0.0115
Epoch 397/500
713/713 [==============================] - 0s 355us/step - loss: 0.0147 - val_loss: 0.0136
Epoch 398/500
713/713 [==============================] - 0s 370us/step - loss: 0.0159 - val_loss: 0.0105
Epoch 399/500
713/713 [==============================] - 0s 373us/step - loss: 0.0131 - val_loss: 0.0104
Epoch 400/500
713/713 [==============================] - 0s 345us/step - loss: 0.0138 - val_loss: 0.0114
Epoch 401/500
713/713 [==============================] - 0s 366us/step - loss: 0.0147 - val_loss: 0.0097
Epoch 402/500
713/713 [==============================] - 0s 356us/step - loss: 0.0125 - val_loss: 0.0113
Epoch 403/500
713/713 [==============================] - 0s 374us/step - loss: 0.0131 - val_loss: 0.0104
Epoch 404/500
713/713 [==============================] - 0s 379us/step - loss: 0.0129 - val_loss: 0.0109
Epoch 405/500
713/713 [==============================] - 0s 374us/step - loss: 0.0133 - val_loss: 0.0109
Epoch 406/500
713/713 [==============================] - 0s 368us/step - loss: 0.0134 - val_loss: 0.0123
Epoch 407/500
713/713 [==============================] - 0s 390us/step - loss: 0.0148 - val_loss: 0.0115
Epoch 408/500
713/713 [==============================] - 0s 352us/step - loss: 0.0143 - val_loss: 0.0095
Epoch 409/500
713/713 [==============================] - 0s 361us/step - loss: 0.0133 - val_loss: 0.0107
Epoch 410/500
713/713 [==============================] - 0s 396us/step - loss: 0.0150 - val_loss: 0.0113
Epoch 411/500
713/713 [==============================] - 0s 369us/step - loss: 0.0146 - val_loss: 0.0100
Epoch 412/500
713/713 [==============================] - 0s 357us/step - loss: 0.0134 - val_loss: 0.0107
Epoch 413/500
713/713 [==============================] - 0s 367us/step - loss: 0.0131 - val_loss: 0.0093
Epoch 414/500
713/713 [==============================] - 0s 361us/step - loss: 0.0125 - val_loss: 0.0113
Epoch 415/500
713/713 [==============================] - 0s 372us/step - loss: 0.0130 - val_loss: 0.0090
Epoch 416/500
713/713 [==============================] - 0s 363us/step - loss: 0.0122 - val_loss: 0.0118
Epoch 417/500
713/713 [==============================] - 0s 359us/step - loss: 0.0142 - val_loss: 0.0105
Epoch 418/500
713/713 [==============================] - 0s 387us/step - loss: 0.0133 - val_loss: 0.0110
Epoch 419/500
713/713 [==============================] - 0s 376us/step - loss: 0.0138 - val_loss: 0.0124
Epoch 420/500
713/713 [==============================] - 0s 359us/step - loss: 0.0141 - val_loss: 0.0123
Epoch 421/500
713/713 [==============================] - 0s 367us/step - loss: 0.0142 - val_loss: 0.0095
Epoch 422/500
713/713 [==============================] - 0s 351us/step - loss: 0.0130 - val_loss: 0.0098
Epoch 423/500
713/713 [==============================] - 0s 372us/step - loss: 0.0135 - val_loss: 0.0102
Epoch 424/500
713/713 [==============================] - 0s 366us/step - loss: 0.0139 - val_loss: 0.0109
Epoch 425/500
713/713 [==============================] - 0s 353us/step - loss: 0.0130 - val_loss: 0.0088
Epoch 426/500
713/713 [==============================] - 0s 365us/step - loss: 0.0118 - val_loss: 0.0088
Epoch 427/500
713/713 [==============================] - 0s 363us/step - loss: 0.0115 - val_loss: 0.0108
Epoch 428/500
713/713 [==============================] - 0s 367us/step - loss: 0.0140 - val_loss: 0.0143
Epoch 429/500
713/713 [==============================] - 0s 364us/step - loss: 0.0148 - val_loss: 0.0094
Epoch 430/500
713/713 [==============================] - 0s 384us/step - loss: 0.0126 - val_loss: 0.0119
Epoch 431/500
713/713 [==============================] - 0s 374us/step - loss: 0.0142 - val_loss: 0.0100
Epoch 432/500
713/713 [==============================] - 0s 376us/step - loss: 0.0122 - val_loss: 0.0088
Epoch 433/500
713/713 [==============================] - 0s 377us/step - loss: 0.0116 - val_loss: 0.0095
Epoch 434/500
713/713 [==============================] - 0s 394us/step - loss: 0.0120 - val_loss: 0.0092
Epoch 435/500
713/713 [==============================] - 0s 363us/step - loss: 0.0129 - val_loss: 0.0122
Epoch 436/500
713/713 [==============================] - 0s 383us/step - loss: 0.0153 - val_loss: 0.0091
Epoch 437/500
713/713 [==============================] - 0s 366us/step - loss: 0.0115 - val_loss: 0.0089
Epoch 438/500
713/713 [==============================] - 0s 370us/step - loss: 0.0112 - val_loss: 0.0077
Epoch 439/500
713/713 [==============================] - 0s 370us/step - loss: 0.0109 - val_loss: 0.0079
Epoch 440/500
713/713 [==============================] - 0s 391us/step - loss: 0.0107 - val_loss: 0.0086
Epoch 441/500
713/713 [==============================] - 0s 356us/step - loss: 0.0126 - val_loss: 0.0083
Epoch 442/500
713/713 [==============================] - 0s 392us/step - loss: 0.0118 - val_loss: 0.0093
Epoch 443/500
713/713 [==============================] - 0s 386us/step - loss: 0.0135 - val_loss: 0.0184
Epoch 444/500
713/713 [==============================] - 0s 360us/step - loss: 0.0187 - val_loss: 0.0087
Epoch 445/500
713/713 [==============================] - 0s 351us/step - loss: 0.0116 - val_loss: 0.0081
Epoch 446/500
713/713 [==============================] - 0s 347us/step - loss: 0.0107 - val_loss: 0.0076
Epoch 447/500
713/713 [==============================] - 0s 382us/step - loss: 0.0106 - val_loss: 0.0078
Epoch 448/500
713/713 [==============================] - 0s 374us/step - loss: 0.0119 - val_loss: 0.0145
Epoch 449/500
713/713 [==============================] - 0s 382us/step - loss: 0.0165 - val_loss: 0.0089
Epoch 450/500
713/713 [==============================] - 0s 366us/step - loss: 0.0111 - val_loss: 0.0074
Epoch 451/500
713/713 [==============================] - 0s 350us/step - loss: 0.0103 - val_loss: 0.0080
Epoch 452/500
713/713 [==============================] - 0s 367us/step - loss: 0.0106 - val_loss: 0.0071
Epoch 453/500
713/713 [==============================] - 0s 391us/step - loss: 0.0099 - val_loss: 0.0065
Epoch 454/500
713/713 [==============================] - 0s 359us/step - loss: 0.0102 - val_loss: 0.0069
Epoch 455/500
713/713 [==============================] - 0s 403us/step - loss: 0.0106 - val_loss: 0.0124
Epoch 456/500
713/713 [==============================] - 0s 375us/step - loss: 0.0146 - val_loss: 0.0112
Epoch 457/500
713/713 [==============================] - 0s 390us/step - loss: 0.0128 - val_loss: 0.0072
Epoch 458/500
713/713 [==============================] - 0s 385us/step - loss: 0.0103 - val_loss: 0.0062
Epoch 459/500
713/713 [==============================] - 0s 394us/step - loss: 0.0093 - val_loss: 0.0072
Epoch 460/500
713/713 [==============================] - 0s 361us/step - loss: 0.0093 - val_loss: 0.0062
Epoch 461/500
713/713 [==============================] - 0s 375us/step - loss: 0.0089 - val_loss: 0.0059
Epoch 462/500
713/713 [==============================] - 0s 364us/step - loss: 0.0088 - val_loss: 0.0111
Epoch 463/500
713/713 [==============================] - 0s 377us/step - loss: 0.0180 - val_loss: 0.0097
Epoch 464/500
713/713 [==============================] - 0s 380us/step - loss: 0.0114 - val_loss: 0.0056
Epoch 465/500
713/713 [==============================] - 0s 367us/step - loss: 0.0086 - val_loss: 0.0060
Epoch 466/500
713/713 [==============================] - 0s 382us/step - loss: 0.0085 - val_loss: 0.0054
Epoch 467/500
713/713 [==============================] - 0s 361us/step - loss: 0.0089 - val_loss: 0.0075
Epoch 468/500
713/713 [==============================] - 0s 358us/step - loss: 0.0103 - val_loss: 0.0097
Epoch 469/500
713/713 [==============================] - 0s 352us/step - loss: 0.0120 - val_loss: 0.0096
Epoch 470/500
713/713 [==============================] - 0s 355us/step - loss: 0.0118 - val_loss: 0.0073
Epoch 471/500
713/713 [==============================] - 0s 354us/step - loss: 0.0098 - val_loss: 0.0063
Epoch 472/500
713/713 [==============================] - 0s 373us/step - loss: 0.0088 - val_loss: 0.0061
Epoch 473/500
713/713 [==============================] - 0s 388us/step - loss: 0.0085 - val_loss: 0.0068
Epoch 474/500
713/713 [==============================] - 0s 383us/step - loss: 0.0090 - val_loss: 0.0088
Epoch 475/500
713/713 [==============================] - 0s 364us/step - loss: 0.0108 - val_loss: 0.0060
Epoch 476/500
713/713 [==============================] - 0s 362us/step - loss: 0.0087 - val_loss: 0.0076
Epoch 477/500
713/713 [==============================] - 0s 364us/step - loss: 0.0099 - val_loss: 0.0104
Epoch 478/500
713/713 [==============================] - 0s 358us/step - loss: 0.0115 - val_loss: 0.0064
Epoch 479/500
713/713 [==============================] - 0s 373us/step - loss: 0.0081 - val_loss: 0.0051
Epoch 480/500
713/713 [==============================] - 0s 500us/step - loss: 0.0072 - val_loss: 0.0059
Epoch 481/500
713/713 [==============================] - 0s 348us/step - loss: 0.0081 - val_loss: 0.0053
Epoch 482/500
713/713 [==============================] - 0s 347us/step - loss: 0.0073 - val_loss: 0.0060
Epoch 483/500
713/713 [==============================] - 0s 403us/step - loss: 0.0083 - val_loss: 0.0123
Epoch 484/500
713/713 [==============================] - 0s 348us/step - loss: 0.0147 - val_loss: 0.0102
Epoch 485/500
713/713 [==============================] - 0s 370us/step - loss: 0.0115 - val_loss: 0.0047
Epoch 486/500
713/713 [==============================] - 0s 376us/step - loss: 0.0073 - val_loss: 0.0047
Epoch 487/500
713/713 [==============================] - 0s 380us/step - loss: 0.0072 - val_loss: 0.0058
Epoch 488/500
713/713 [==============================] - 0s 353us/step - loss: 0.0073 - val_loss: 0.0049
Epoch 489/500
713/713 [==============================] - 0s 385us/step - loss: 0.0071 - val_loss: 0.0068
Epoch 490/500
713/713 [==============================] - 0s 362us/step - loss: 0.0104 - val_loss: 0.0153
Epoch 491/500
713/713 [==============================] - 0s 357us/step - loss: 0.0141 - val_loss: 0.0049
Epoch 492/500
713/713 [==============================] - 0s 359us/step - loss: 0.0074 - val_loss: 0.0063
Epoch 493/500
713/713 [==============================] - 0s 383us/step - loss: 0.0083 - val_loss: 0.0052
Epoch 494/500
713/713 [==============================] - 0s 367us/step - loss: 0.0078 - val_loss: 0.0061
Epoch 495/500
713/713 [==============================] - 0s 386us/step - loss: 0.0086 - val_loss: 0.0085
Epoch 496/500
713/713 [==============================] - 0s 366us/step - loss: 0.0104 - val_loss: 0.0092
Epoch 497/500
713/713 [==============================] - 0s 355us/step - loss: 0.0096 - val_loss: 0.0050
Epoch 498/500
713/713 [==============================] - 0s 377us/step - loss: 0.0069 - val_loss: 0.0057
Epoch 499/500
713/713 [==============================] - 0s 379us/step - loss: 0.0074 - val_loss: 0.0086
Epoch 500/500
713/713 [==============================] - 0s 372us/step - loss: 0.0099 - val_loss: 0.0068
[ 0.2837354 0.13066846 0.2674231 0.21200249 0.29892477 -0.02160506
0.35313344 0.02359097 0.2251389 0.18206295 0.21717575 -0.05458464
0.32186207 0.3663419 0.3125833 0.13621256 0.09949653 0.07410355
0.30307963 0.27825806 0.2292639 0.49254513 0.554037 0.53707355
0.3130668 0.54786354 0.26616228 0.06054717 0.17366457 0.22881004
0.36362937 0.22721535 0.28853238 0.2505666 0.41914698 0.3662823
0.34105155 0.19609433 0.21213531 0.2534542 0.03413274 0.1846909
0.21076497 0.24443313 0.12074589 0.09796765 0.22169384 0.40291727
0.31003013 0.42522457 0.24438745 0.32730204 0.5105188 0.17382053
0.31817666 0.16640162 0.29546922 -0.05937299 0.23860934 0.2530895
0.26683512 0.5607325 0.4615818 0.11999073 0.287012 0.14122477
0.23749849 0.35403964 0.24786392 0.45360103 0.16335806 0.54284346
0.19340193 0.48644328 0.26074612 0.3229501 0.20390677 0.33223823
0.33181307 0.06711607 0.47094566 0.21292648 0.42382118 -0.01053309
0.3581684 0.09524589 0.12425592 0.04421867 0.11036206 0.23769787
0.25493094 0.27247402 -0.04502001 0.2316226 0.30767807 0.23384318
0.30021304 0.05892255 0.00310287 0.31805846 0.6262935 0.17336819
0.2124919 0.50422525 0.2901464 0.41229776 0.27708048 0.25333965
0.31702748 0.28639993 0.30313554 -0.03072766 0.28496274 0.42511684
0.23315129 0.14995164 0.4116198 0.18472561 0.25549543 0.2689157
0.08815807 0.49369392 0.16127497 0.2809458 0.11675342 0.14189035
0.15325686 0.19788578 0.28165212 0.55767566 0.28481743 0.08191175
0.21382686 0.38431796 0.18241963 0.13341407 0.1434057 0.2995545
0.3263724 0.50595045 0.16723388 0.5816046 0.0768657 0.04275063
0.11457536 0.28294685 0.5584938 0.2957511 0.12452691 0.03385904
0.13531905 0.27734134 0.2813494 0.32976905 0.2242885 0.24674916
0.32537398 0.29771742 0.52076566 0.23794219 0.14115635 0.29995754
0.16669944 -0.12494405 0.53644025 0.28072217 0.258775 -0.04504492
0.28873187 0.2423321 0.32618046 0.182264 0.29754934 -0.02717817
0.24446636 0.1564365 0.2024808 0.21691665 0.19070217 0.45552242
0.2957746 -0.04558087 0.56432027 0.10362086 0.17434746 0.13488273
0.2456862 0.3583394 0.2957743 0.3053769 0.54074144 0.01655407
0.20286813 0.24534702 0.26258105 0.33480623 0.04299508 0.5315139
0.15460968]
[[0.30376131]
[0.17926638]
[0.29697998]
[0.16096808]
[0.22410024]
[0.03444761]
[0.1793758 ]
[0.07259794]
[0.23534 ]
[0.21066731]
[0.17444546]
[0.02501782]
[0.39331688]
[0.3183957 ]
[0.33324373]
[0.17929773]
[0.02460753]
[0.09394036]
[0.29564347]
[0.16113114]
[0.23025565]
[0.48176477]
[0.52829015]
[0.51581239]
[0.26137364]
[0.24188961]
[0.28913834]
[0.01216972]
[0.14591856]
[0.12475852]
[0.26698405]
[0.29098291]
[0.31683853]
[0.19536999]
[0.39745349]
[0.47736937]
[0.30674279]
[0.37722681]
[0.18154165]
[0.06539988]
[0.05745166]
[0.19136411]
[0.12757675]
[0.13966704]
[0.11635038]
[0.05815551]
[0.18513641]
[0.40445403]
[0.36540421]
[0.2571689 ]
[0.17066048]
[0.21399782]
[0.5333121 ]
[0.18576546]
[0.30621748]
[0.17791662]
[0.27923286]
[0.02982189]
[0.12715399]
[0.24825758]
[0.15880369]
[0.48109791]
[0.45503335]
[0.01783275]
[0.09274541]
[0.22752051]
[0.392238 ]
[0.13607979]
[0.29655867]
[0.49523921]
[0.09980146]
[0.51813544]
[0.28434103]
[0.57380072]
[0.39899703]
[0.33862942]
[0.22622442]
[0.37613703]
[0.33944244]
[0.08268783]
[0.47397051]
[0.1787037 ]
[0.42164498]
[0.02672374]
[0.32933158]
[0.05860567]
[0.1334169 ]
[0.09298899]
[0.10582318]
[0.30503886]
[0.30240385]
[0.25196003]
[0.01902321]
[0.23939783]
[0.24297026]
[0.29074052]
[0.34847054]
[0.05554975]
[0.02488 ]
[0.37010485]
[0.66647191]
[0.04640732]
[0.15240274]
[0.48978626]
[0.34222712]
[0.33892079]
[0.21486885]
[0.24164261]
[0.32740677]
[0.19193989]
[0.10572545]
[0.0497554 ]
[0.25583032]
[0.45638869]
[0.1372405 ]
[0.06706732]
[0.34513678]
[0.18059749]
[0.35872003]
[0.19203508]
[0.0398102 ]
[0.4395968 ]
[0.02586708]
[0.20296509]
[0.17472412]
[0.03725014]
[0.09757507]
[0.22668692]
[0.16963881]
[0.50075603]
[0.29267525]
[0.06341639]
[0.33176969]
[0.54401807]
[0.05511924]
[0.05005923]
[0.29538858]
[0.36175453]
[0.28475732]
[0.58534247]
[0.06065409]
[0.67973073]
[0.06428781]
[0.03838773]
[0.04372095]
[0.32068606]
[0.62987418]
[0.32802373]
[0.02533175]
[0.00495741]
[0.12666212]
[0.28249264]
[0.2962222 ]
[0.30461304]
[0.25004827]
[0.25894027]
[0.33895652]
[0.31883039]
[0.59327556]
[0.33185348]
[0.11883397]
[0.19338325]
[0.11496764]
[0.01307653]
[0.59679455]
[0.17888339]
[0.20361352]
[0.05562554]
[0.31772348]
[0.14999075]
[0.35325085]
[0.19826264]
[0.33055963]
[0.01675104]
[0.19647381]
[0.11277727]
[0.17862355]
[0.24146283]
[0.2629925 ]
[0.48971968]
[0.21830844]
[0.03059106]
[0.91877887]
[0.19283255]
[0.10411746]
[0.20991269]
[0.17321256]
[0.35164391]
[0.15734879]
[0.28293243]
[0.71555413]
[0.04064039]
[0.29239408]
[0.13573855]
[0.16239992]
[0.3549255 ]
[0.02435676]
[0.59179275]
[0.20967079]]
fig = plt.figure(1)
plt.plot(predict_y, 'r:')
plt.plot(test_y, 'g-')
plt.legend(['predict', 'true'])
plt.show()
plt.plot(predict_y, 'g:')
plt.plot(test_y, 'r-')
plt.show()