In [ ]:
import numpy as np
from sklearn import preprocessing
import CoolProp.CoolProp as CP
import matplotlib.pyplot as plt
%matplotlib inline
from keras.models import Model
from keras.layers import Dense, Activation, Input, BatchNormalization, Dropout
from keras import layers
from keras.callbacks import ModelCheckpoint
def rho_TP_gen(x, fluid):
rho = CP.PropsSI('D', 'T', x[0], 'P', x[1], fluid)
return rho
In [ ]:
def res_block(input_tensor, n_neuron, stage, block, bn=False):
conv_name_base = 'res' + str(stage) + block + '_branch'
bn_name_base = 'bn' + str(stage) + block + '_branch'
x = Dense(n_neuron, name=conv_name_base + '2a')(input_tensor)
if bn:
x = BatchNormalization(axis=-1, name=bn_name_base + '2a')(x)
x = Activation('relu')(x)
x = Dense(n_neuron, name=conv_name_base + '2b')(x)
if bn:
x = BatchNormalization(axis=-1, name=bn_name_base + '2b')(x)
x = layers.add([x, input_tensor])
x = Activation('relu')(x)
return x
In [20]:
######################
print('Generate data ...')
# n_train = 20000
nT = 100
nP = 100
n_train = nT * nP
T_min = 100
T_max = 160
P_min = 1
P_max = 2
fluid = 'nitrogen'
# get critical pressure
p_c = CP.PropsSI(fluid, 'pcrit')
p_vec = np.linspace(1, 3, nP) * p_c
T_vec = np.linspace(T_min, T_max, nT)
rho_vec = np.asarray([CP.PropsSI('D', 'T', x, 'P', 1.1 * p_c, fluid) for x in T_vec])
# prepare input
# rho = f(T, P)
# 1. uniform random
T_P_train = np.random.rand(n_train, 2)
# 2. family curves
# T_P_train = np.random.rand(n_train, 1)
# tmp = np.ones((nT, nP))* np.linspace(0, 1, nP)
# T_P_train = np.append(T_P_train, tmp.reshape(-1, 1), axis=1)
rho_TP_train = np.asarray(
[rho_TP_gen(x, fluid) for x in (T_P_train * [(T_max - T_min), (P_max - P_min) * p_c] + [T_min, p_c])])
# normalize train data
rhoTP_scaler = preprocessing.MinMaxScaler()
rho_TP_train = rhoTP_scaler.fit_transform(rho_TP_train.reshape(-1, 1))
# normalize test data
T_scaler = preprocessing.MinMaxScaler()
T_test = T_scaler.fit_transform(T_vec.reshape(-1, 1))
Generate data ...
In [ ]:
######################
print('set up ANN')
# ANN parameters
dim = 2
n_neuron = 200
batch_size = 1024
epochs = 400
vsplit = 0.1
batch_norm = False
# This returns a tensor
inputs = Input(shape=(dim,))
# a layer instance is callable on a tensor, and returns a tensor
x = Dense(n_neuron, activation='relu')(inputs)
# less then 2 res_block, there will be variance
x = res_block(x, n_neuron, stage=1, block='a', bn=batch_norm)
x = res_block(x, n_neuron, stage=1, block='b', bn=batch_norm)
# x = res_block(x, n_neuron, stage=1, block='c', bn=batch_norm)
# x = res_block(x, n_neuron, stage=1, block='d', bn=batch_norm)
predictions = Dense(1, activation='linear')(x)
model = Model(inputs=inputs, outputs=predictions)
model.compile(loss='mse', optimizer='adam', metrics=['accuracy'])
# checkpoint (save the best model based validate loss)
filepath = "./tmp/weights.best.hdf5"
checkpoint = ModelCheckpoint(filepath,
monitor='val_loss',
verbose=1,
save_best_only=True,
mode='min',
period=10)
callbacks_list = [checkpoint]
# fit the model
history = model.fit(
# T_train, rho_train,
T_P_train, rho_TP_train,
epochs=epochs,
batch_size=batch_size,
validation_split=vsplit,
verbose=2,
callbacks=callbacks_list,
shuffle=True)
set up ANN
Train on 9000 samples, validate on 1000 samples
Epoch 1/400
0s - loss: 0.1865 - acc: 2.2222e-04 - val_loss: 0.0956 - val_acc: 0.0000e+00
Epoch 2/400
0s - loss: 0.0736 - acc: 2.2222e-04 - val_loss: 0.0475 - val_acc: 0.0000e+00
Epoch 3/400
0s - loss: 0.0301 - acc: 2.2222e-04 - val_loss: 0.0137 - val_acc: 0.0000e+00
Epoch 4/400
0s - loss: 0.0072 - acc: 2.2222e-04 - val_loss: 0.0037 - val_acc: 0.0000e+00
Epoch 5/400
0s - loss: 0.0030 - acc: 2.2222e-04 - val_loss: 0.0022 - val_acc: 0.0000e+00
Epoch 6/400
0s - loss: 0.0020 - acc: 2.2222e-04 - val_loss: 0.0016 - val_acc: 0.0000e+00
Epoch 7/400
0s - loss: 0.0013 - acc: 2.2222e-04 - val_loss: 0.0010 - val_acc: 0.0000e+00
Epoch 8/400
0s - loss: 8.9474e-04 - acc: 2.2222e-04 - val_loss: 6.9408e-04 - val_acc: 0.0000e+00
Epoch 9/400
0s - loss: 6.1732e-04 - acc: 2.2222e-04 - val_loss: 4.9110e-04 - val_acc: 0.0000e+00
Epoch 10/400
Epoch 00009: val_loss improved from inf to 0.00034, saving model to ./tmp/weights.best.hdf5
0s - loss: 4.4509e-04 - acc: 2.2222e-04 - val_loss: 3.4268e-04 - val_acc: 0.0000e+00
Epoch 11/400
0s - loss: 3.3161e-04 - acc: 2.2222e-04 - val_loss: 2.6842e-04 - val_acc: 0.0000e+00
Epoch 12/400
0s - loss: 2.7012e-04 - acc: 2.2222e-04 - val_loss: 1.9383e-04 - val_acc: 0.0000e+00
Epoch 13/400
0s - loss: 2.0595e-04 - acc: 2.2222e-04 - val_loss: 1.5808e-04 - val_acc: 0.0000e+00
Epoch 14/400
0s - loss: 1.6650e-04 - acc: 2.2222e-04 - val_loss: 1.4605e-04 - val_acc: 0.0000e+00
Epoch 15/400
0s - loss: 1.4225e-04 - acc: 2.2222e-04 - val_loss: 1.0620e-04 - val_acc: 0.0000e+00
Epoch 16/400
0s - loss: 1.1699e-04 - acc: 2.2222e-04 - val_loss: 8.1005e-05 - val_acc: 0.0000e+00
Epoch 17/400
0s - loss: 1.0833e-04 - acc: 2.2222e-04 - val_loss: 8.0056e-05 - val_acc: 0.0000e+00
Epoch 18/400
0s - loss: 9.3110e-05 - acc: 2.2222e-04 - val_loss: 6.0229e-05 - val_acc: 0.0000e+00
Epoch 19/400
0s - loss: 8.2330e-05 - acc: 2.2222e-04 - val_loss: 5.8415e-05 - val_acc: 0.0000e+00
Epoch 20/400
Epoch 00019: val_loss improved from 0.00034 to 0.00004, saving model to ./tmp/weights.best.hdf5
0s - loss: 6.7686e-05 - acc: 2.2222e-04 - val_loss: 4.0420e-05 - val_acc: 0.0000e+00
Epoch 21/400
0s - loss: 6.1443e-05 - acc: 2.2222e-04 - val_loss: 4.0384e-05 - val_acc: 0.0000e+00
Epoch 22/400
0s - loss: 5.4279e-05 - acc: 2.2222e-04 - val_loss: 2.9216e-05 - val_acc: 0.0000e+00
Epoch 23/400
0s - loss: 4.9456e-05 - acc: 2.2222e-04 - val_loss: 3.1066e-05 - val_acc: 0.0000e+00
Epoch 24/400
0s - loss: 5.2676e-05 - acc: 2.2222e-04 - val_loss: 5.3709e-05 - val_acc: 0.0000e+00
Epoch 25/400
0s - loss: 5.5353e-05 - acc: 2.2222e-04 - val_loss: 2.9344e-05 - val_acc: 0.0000e+00
Epoch 26/400
0s - loss: 4.3467e-05 - acc: 2.2222e-04 - val_loss: 2.6796e-05 - val_acc: 0.0000e+00
Epoch 27/400
0s - loss: 3.6963e-05 - acc: 2.2222e-04 - val_loss: 1.4279e-05 - val_acc: 0.0000e+00
Epoch 28/400
0s - loss: 3.5694e-05 - acc: 2.2222e-04 - val_loss: 1.1669e-05 - val_acc: 0.0000e+00
Epoch 29/400
0s - loss: 2.9772e-05 - acc: 2.2222e-04 - val_loss: 1.0872e-05 - val_acc: 0.0000e+00
Epoch 30/400
Epoch 00029: val_loss improved from 0.00004 to 0.00001, saving model to ./tmp/weights.best.hdf5
0s - loss: 3.2381e-05 - acc: 2.2222e-04 - val_loss: 1.0149e-05 - val_acc: 0.0000e+00
Epoch 31/400
0s - loss: 3.4352e-05 - acc: 2.2222e-04 - val_loss: 1.2775e-05 - val_acc: 0.0000e+00
Epoch 32/400
0s - loss: 2.9065e-05 - acc: 2.2222e-04 - val_loss: 1.5846e-05 - val_acc: 0.0000e+00
Epoch 33/400
0s - loss: 2.4999e-05 - acc: 2.2222e-04 - val_loss: 7.2225e-06 - val_acc: 0.0000e+00
Epoch 34/400
0s - loss: 3.1406e-05 - acc: 2.2222e-04 - val_loss: 4.9441e-05 - val_acc: 0.0000e+00
Epoch 35/400
0s - loss: 3.8944e-05 - acc: 2.2222e-04 - val_loss: 1.5587e-05 - val_acc: 0.0000e+00
Epoch 36/400
0s - loss: 2.7345e-05 - acc: 2.2222e-04 - val_loss: 2.5162e-05 - val_acc: 0.0000e+00
Epoch 37/400
0s - loss: 4.1493e-05 - acc: 2.2222e-04 - val_loss: 6.9858e-06 - val_acc: 0.0000e+00
Epoch 38/400
0s - loss: 3.6049e-05 - acc: 2.2222e-04 - val_loss: 1.1338e-05 - val_acc: 0.0000e+00
Epoch 39/400
0s - loss: 3.7187e-05 - acc: 2.2222e-04 - val_loss: 8.1508e-06 - val_acc: 0.0000e+00
Epoch 40/400
Epoch 00039: val_loss improved from 0.00001 to 0.00000, saving model to ./tmp/weights.best.hdf5
0s - loss: 2.2651e-05 - acc: 2.2222e-04 - val_loss: 4.5492e-06 - val_acc: 0.0000e+00
Epoch 41/400
0s - loss: 2.1992e-05 - acc: 2.2222e-04 - val_loss: 1.1279e-05 - val_acc: 0.0000e+00
Epoch 42/400
0s - loss: 2.4140e-05 - acc: 2.2222e-04 - val_loss: 7.9823e-06 - val_acc: 0.0000e+00
Epoch 43/400
0s - loss: 2.0453e-05 - acc: 2.2222e-04 - val_loss: 1.2031e-05 - val_acc: 0.0000e+00
Epoch 44/400
0s - loss: 2.3208e-05 - acc: 2.2222e-04 - val_loss: 2.4384e-05 - val_acc: 0.0000e+00
Epoch 45/400
0s - loss: 2.4466e-05 - acc: 2.2222e-04 - val_loss: 4.7752e-06 - val_acc: 0.0000e+00
Epoch 46/400
0s - loss: 1.4850e-05 - acc: 2.2222e-04 - val_loss: 3.1107e-06 - val_acc: 0.0000e+00
Epoch 47/400
0s - loss: 2.2089e-05 - acc: 2.2222e-04 - val_loss: 1.2642e-05 - val_acc: 0.0000e+00
Epoch 48/400
0s - loss: 2.2393e-05 - acc: 2.2222e-04 - val_loss: 8.9501e-06 - val_acc: 0.0000e+00
Epoch 49/400
0s - loss: 1.5706e-05 - acc: 2.2222e-04 - val_loss: 9.4471e-06 - val_acc: 0.0000e+00
Epoch 50/400
Epoch 00049: val_loss improved from 0.00000 to 0.00000, saving model to ./tmp/weights.best.hdf5
0s - loss: 1.6711e-05 - acc: 2.2222e-04 - val_loss: 3.5805e-06 - val_acc: 0.0000e+00
Epoch 51/400
0s - loss: 2.6549e-05 - acc: 2.2222e-04 - val_loss: 6.7742e-06 - val_acc: 0.0000e+00
Epoch 52/400
0s - loss: 9.7424e-05 - acc: 2.2222e-04 - val_loss: 1.1901e-05 - val_acc: 0.0000e+00
Epoch 53/400
0s - loss: 6.9571e-05 - acc: 2.2222e-04 - val_loss: 5.7473e-05 - val_acc: 0.0000e+00
Epoch 54/400
0s - loss: 4.7533e-05 - acc: 2.2222e-04 - val_loss: 4.8019e-05 - val_acc: 0.0000e+00
Epoch 55/400
0s - loss: 2.5854e-05 - acc: 2.2222e-04 - val_loss: 2.1721e-05 - val_acc: 0.0000e+00
Epoch 56/400
0s - loss: 2.0545e-05 - acc: 2.2222e-04 - val_loss: 1.1096e-05 - val_acc: 0.0000e+00
Epoch 57/400
0s - loss: 2.0686e-05 - acc: 2.2222e-04 - val_loss: 2.1700e-05 - val_acc: 0.0000e+00
Epoch 58/400
0s - loss: 1.8421e-05 - acc: 2.2222e-04 - val_loss: 9.7977e-06 - val_acc: 0.0000e+00
Epoch 59/400
0s - loss: 1.6233e-05 - acc: 2.2222e-04 - val_loss: 2.3691e-05 - val_acc: 0.0000e+00
Epoch 60/400
Epoch 00059: val_loss improved from 0.00000 to 0.00000, saving model to ./tmp/weights.best.hdf5
0s - loss: 2.3268e-05 - acc: 2.2222e-04 - val_loss: 2.7142e-06 - val_acc: 0.0000e+00
Epoch 61/400
0s - loss: 1.0213e-05 - acc: 2.2222e-04 - val_loss: 3.6649e-06 - val_acc: 0.0000e+00
Epoch 62/400
0s - loss: 9.6903e-06 - acc: 2.2222e-04 - val_loss: 5.8332e-06 - val_acc: 0.0000e+00
Epoch 63/400
0s - loss: 1.1510e-05 - acc: 2.2222e-04 - val_loss: 3.7816e-06 - val_acc: 0.0000e+00
Epoch 64/400
0s - loss: 1.2230e-05 - acc: 2.2222e-04 - val_loss: 3.1369e-06 - val_acc: 0.0000e+00
Epoch 65/400
0s - loss: 1.6910e-05 - acc: 2.2222e-04 - val_loss: 1.2144e-05 - val_acc: 0.0000e+00
Epoch 66/400
0s - loss: 2.3449e-05 - acc: 2.2222e-04 - val_loss: 9.2346e-06 - val_acc: 0.0000e+00
Epoch 67/400
0s - loss: 1.9440e-05 - acc: 2.2222e-04 - val_loss: 3.0811e-05 - val_acc: 0.0000e+00
Epoch 68/400
0s - loss: 1.9271e-05 - acc: 2.2222e-04 - val_loss: 3.1122e-06 - val_acc: 0.0000e+00
Epoch 69/400
0s - loss: 1.2898e-05 - acc: 2.2222e-04 - val_loss: 1.3611e-05 - val_acc: 0.0000e+00
Epoch 70/400
Epoch 00069: val_loss did not improve
0s - loss: 3.0281e-05 - acc: 2.2222e-04 - val_loss: 3.6618e-06 - val_acc: 0.0000e+00
Epoch 71/400
0s - loss: 3.6867e-05 - acc: 2.2222e-04 - val_loss: 3.8563e-06 - val_acc: 0.0000e+00
Epoch 72/400
0s - loss: 3.1160e-05 - acc: 2.2222e-04 - val_loss: 2.5099e-05 - val_acc: 0.0000e+00
Epoch 73/400
0s - loss: 4.7869e-05 - acc: 2.2222e-04 - val_loss: 8.6364e-05 - val_acc: 0.0000e+00
Epoch 74/400
0s - loss: 5.8297e-05 - acc: 2.2222e-04 - val_loss: 2.6332e-05 - val_acc: 0.0000e+00
Epoch 75/400
0s - loss: 4.9528e-05 - acc: 2.2222e-04 - val_loss: 4.1925e-05 - val_acc: 0.0000e+00
Epoch 76/400
0s - loss: 2.3171e-05 - acc: 2.2222e-04 - val_loss: 6.5173e-06 - val_acc: 0.0000e+00
Epoch 77/400
0s - loss: 2.0920e-05 - acc: 2.2222e-04 - val_loss: 1.4512e-05 - val_acc: 0.0000e+00
Epoch 78/400
0s - loss: 2.1987e-05 - acc: 2.2222e-04 - val_loss: 1.9076e-05 - val_acc: 0.0000e+00
Epoch 79/400
0s - loss: 2.9557e-05 - acc: 2.2222e-04 - val_loss: 2.1656e-05 - val_acc: 0.0000e+00
Epoch 80/400
Epoch 00079: val_loss did not improve
0s - loss: 2.8448e-05 - acc: 2.2222e-04 - val_loss: 6.6982e-06 - val_acc: 0.0000e+00
Epoch 81/400
0s - loss: 1.5209e-05 - acc: 2.2222e-04 - val_loss: 6.9250e-06 - val_acc: 0.0000e+00
Epoch 82/400
0s - loss: 9.8302e-06 - acc: 2.2222e-04 - val_loss: 1.2991e-06 - val_acc: 0.0000e+00
Epoch 83/400
0s - loss: 7.5892e-06 - acc: 2.2222e-04 - val_loss: 2.1639e-06 - val_acc: 0.0000e+00
Epoch 84/400
0s - loss: 1.6879e-05 - acc: 2.2222e-04 - val_loss: 1.8586e-06 - val_acc: 0.0000e+00
Epoch 85/400
0s - loss: 8.2009e-06 - acc: 2.2222e-04 - val_loss: 1.4644e-05 - val_acc: 0.0000e+00
Epoch 86/400
0s - loss: 4.5812e-05 - acc: 2.2222e-04 - val_loss: 6.7868e-06 - val_acc: 0.0000e+00
Epoch 87/400
0s - loss: 3.1412e-05 - acc: 2.2222e-04 - val_loss: 1.8914e-05 - val_acc: 0.0000e+00
Epoch 88/400
0s - loss: 1.8317e-05 - acc: 2.2222e-04 - val_loss: 8.8014e-06 - val_acc: 0.0000e+00
Epoch 89/400
0s - loss: 1.5473e-05 - acc: 2.2222e-04 - val_loss: 1.0976e-05 - val_acc: 0.0000e+00
Epoch 90/400
Epoch 00089: val_loss did not improve
0s - loss: 2.2789e-05 - acc: 2.2222e-04 - val_loss: 7.9436e-06 - val_acc: 0.0000e+00
Epoch 91/400
0s - loss: 2.2746e-05 - acc: 2.2222e-04 - val_loss: 8.2118e-06 - val_acc: 0.0000e+00
Epoch 92/400
0s - loss: 8.2212e-06 - acc: 2.2222e-04 - val_loss: 6.2341e-06 - val_acc: 0.0000e+00
Epoch 93/400
0s - loss: 7.0776e-06 - acc: 2.2222e-04 - val_loss: 1.7680e-06 - val_acc: 0.0000e+00
Epoch 94/400
0s - loss: 7.6456e-06 - acc: 2.2222e-04 - val_loss: 8.5400e-06 - val_acc: 0.0000e+00
Epoch 95/400
0s - loss: 3.8787e-05 - acc: 2.2222e-04 - val_loss: 1.1036e-04 - val_acc: 0.0000e+00
Epoch 96/400
0s - loss: 5.3101e-05 - acc: 2.2222e-04 - val_loss: 2.2230e-06 - val_acc: 0.0000e+00
Epoch 97/400
0s - loss: 6.5431e-05 - acc: 2.2222e-04 - val_loss: 2.6816e-05 - val_acc: 0.0000e+00
Epoch 98/400
0s - loss: 5.0099e-05 - acc: 2.2222e-04 - val_loss: 6.8260e-06 - val_acc: 0.0000e+00
Epoch 99/400
0s - loss: 2.4090e-05 - acc: 2.2222e-04 - val_loss: 1.6330e-05 - val_acc: 0.0000e+00
Epoch 100/400
Epoch 00099: val_loss did not improve
0s - loss: 2.1885e-05 - acc: 2.2222e-04 - val_loss: 2.4668e-05 - val_acc: 0.0000e+00
Epoch 101/400
0s - loss: 1.7445e-05 - acc: 2.2222e-04 - val_loss: 4.8982e-06 - val_acc: 0.0000e+00
Epoch 102/400
0s - loss: 1.2071e-05 - acc: 2.2222e-04 - val_loss: 1.6719e-05 - val_acc: 0.0000e+00
Epoch 103/400
0s - loss: 6.6028e-05 - acc: 2.2222e-04 - val_loss: 1.5916e-05 - val_acc: 0.0000e+00
Epoch 104/400
0s - loss: 1.2294e-05 - acc: 2.2222e-04 - val_loss: 1.1678e-05 - val_acc: 0.0000e+00
Epoch 105/400
0s - loss: 1.5830e-05 - acc: 2.2222e-04 - val_loss: 1.5902e-05 - val_acc: 0.0000e+00
Epoch 106/400
0s - loss: 2.8401e-05 - acc: 2.2222e-04 - val_loss: 7.1780e-05 - val_acc: 0.0000e+00
Epoch 107/400
0s - loss: 4.4378e-05 - acc: 2.2222e-04 - val_loss: 9.7359e-05 - val_acc: 0.0000e+00
Epoch 108/400
0s - loss: 6.7457e-05 - acc: 2.2222e-04 - val_loss: 3.3422e-05 - val_acc: 0.0000e+00
Epoch 109/400
0s - loss: 4.1983e-05 - acc: 2.2222e-04 - val_loss: 2.4052e-06 - val_acc: 0.0000e+00
Epoch 110/400
Epoch 00109: val_loss did not improve
0s - loss: 1.1641e-05 - acc: 2.2222e-04 - val_loss: 2.1498e-05 - val_acc: 0.0000e+00
Epoch 111/400
0s - loss: 2.4588e-05 - acc: 2.2222e-04 - val_loss: 1.4339e-05 - val_acc: 0.0000e+00
Epoch 112/400
0s - loss: 1.0569e-05 - acc: 2.2222e-04 - val_loss: 3.4148e-06 - val_acc: 0.0000e+00
Epoch 113/400
0s - loss: 1.0544e-05 - acc: 2.2222e-04 - val_loss: 1.0857e-05 - val_acc: 0.0000e+00
Epoch 114/400
0s - loss: 1.7031e-05 - acc: 2.2222e-04 - val_loss: 1.0459e-05 - val_acc: 0.0000e+00
Epoch 115/400
0s - loss: 1.6124e-05 - acc: 2.2222e-04 - val_loss: 3.7823e-05 - val_acc: 0.0000e+00
Epoch 116/400
0s - loss: 3.1787e-05 - acc: 2.2222e-04 - val_loss: 2.2801e-05 - val_acc: 0.0000e+00
Epoch 117/400
0s - loss: 3.7794e-05 - acc: 2.2222e-04 - val_loss: 1.3169e-05 - val_acc: 0.0000e+00
Epoch 118/400
0s - loss: 1.2644e-05 - acc: 2.2222e-04 - val_loss: 1.8551e-06 - val_acc: 0.0000e+00
Epoch 119/400
0s - loss: 1.0435e-05 - acc: 2.2222e-04 - val_loss: 4.8997e-06 - val_acc: 0.0000e+00
Epoch 120/400
Epoch 00119: val_loss did not improve
0s - loss: 8.3603e-06 - acc: 2.2222e-04 - val_loss: 7.9312e-06 - val_acc: 0.0000e+00
Epoch 121/400
0s - loss: 1.0904e-05 - acc: 2.2222e-04 - val_loss: 2.2867e-05 - val_acc: 0.0000e+00
Epoch 122/400
0s - loss: 1.2130e-05 - acc: 2.2222e-04 - val_loss: 1.3761e-05 - val_acc: 0.0000e+00
Epoch 123/400
0s - loss: 3.7336e-05 - acc: 2.2222e-04 - val_loss: 2.2158e-05 - val_acc: 0.0000e+00
Epoch 124/400
0s - loss: 1.8458e-05 - acc: 2.2222e-04 - val_loss: 4.2683e-05 - val_acc: 0.0000e+00
Epoch 125/400
0s - loss: 4.1101e-05 - acc: 2.2222e-04 - val_loss: 9.5455e-06 - val_acc: 0.0000e+00
Epoch 126/400
0s - loss: 1.3581e-05 - acc: 2.2222e-04 - val_loss: 1.0644e-05 - val_acc: 0.0000e+00
Epoch 127/400
0s - loss: 1.2038e-05 - acc: 2.2222e-04 - val_loss: 2.6241e-06 - val_acc: 0.0000e+00
Epoch 128/400
0s - loss: 1.1129e-05 - acc: 2.2222e-04 - val_loss: 1.2536e-05 - val_acc: 0.0000e+00
Epoch 129/400
0s - loss: 9.4862e-06 - acc: 2.2222e-04 - val_loss: 1.7207e-06 - val_acc: 0.0000e+00
Epoch 130/400
Epoch 00129: val_loss did not improve
0s - loss: 1.8810e-05 - acc: 2.2222e-04 - val_loss: 9.1885e-05 - val_acc: 0.0000e+00
Epoch 131/400
0s - loss: 1.1290e-04 - acc: 2.2222e-04 - val_loss: 1.4935e-05 - val_acc: 0.0000e+00
Epoch 132/400
0s - loss: 7.1668e-05 - acc: 2.2222e-04 - val_loss: 9.7646e-05 - val_acc: 0.0000e+00
Epoch 133/400
0s - loss: 9.0892e-05 - acc: 2.2222e-04 - val_loss: 2.7213e-05 - val_acc: 0.0000e+00
Epoch 134/400
0s - loss: 3.8235e-05 - acc: 2.2222e-04 - val_loss: 1.6390e-05 - val_acc: 0.0000e+00
Epoch 135/400
0s - loss: 9.6349e-06 - acc: 2.2222e-04 - val_loss: 3.0171e-06 - val_acc: 0.0000e+00
Epoch 136/400
0s - loss: 9.5477e-06 - acc: 2.2222e-04 - val_loss: 1.2781e-05 - val_acc: 0.0000e+00
Epoch 137/400
0s - loss: 1.2000e-05 - acc: 2.2222e-04 - val_loss: 1.2167e-05 - val_acc: 0.0000e+00
Epoch 138/400
0s - loss: 1.1749e-05 - acc: 2.2222e-04 - val_loss: 4.3702e-06 - val_acc: 0.0000e+00
Epoch 139/400
0s - loss: 1.8222e-05 - acc: 2.2222e-04 - val_loss: 1.2412e-05 - val_acc: 0.0000e+00
Epoch 140/400
Epoch 00139: val_loss did not improve
0s - loss: 2.6197e-05 - acc: 2.2222e-04 - val_loss: 3.7747e-05 - val_acc: 0.0000e+00
Epoch 141/400
0s - loss: 1.5379e-05 - acc: 2.2222e-04 - val_loss: 2.9329e-06 - val_acc: 0.0000e+00
Epoch 142/400
0s - loss: 1.0487e-05 - acc: 2.2222e-04 - val_loss: 3.7178e-06 - val_acc: 0.0000e+00
Epoch 143/400
0s - loss: 7.6651e-06 - acc: 2.2222e-04 - val_loss: 3.2460e-06 - val_acc: 0.0000e+00
Epoch 144/400
0s - loss: 6.7560e-06 - acc: 2.2222e-04 - val_loss: 9.3910e-06 - val_acc: 0.0000e+00
Epoch 145/400
0s - loss: 1.4329e-05 - acc: 2.2222e-04 - val_loss: 3.1040e-06 - val_acc: 0.0000e+00
Epoch 146/400
0s - loss: 3.8299e-05 - acc: 2.2222e-04 - val_loss: 1.2074e-05 - val_acc: 0.0000e+00
Epoch 147/400
0s - loss: 1.1627e-05 - acc: 2.2222e-04 - val_loss: 1.2533e-06 - val_acc: 0.0000e+00
Epoch 148/400
0s - loss: 1.4453e-05 - acc: 2.2222e-04 - val_loss: 2.0759e-06 - val_acc: 0.0000e+00
Epoch 149/400
0s - loss: 5.8873e-06 - acc: 2.2222e-04 - val_loss: 2.4097e-06 - val_acc: 0.0000e+00
Epoch 150/400
Epoch 00149: val_loss improved from 0.00000 to 0.00000, saving model to ./tmp/weights.best.hdf5
0s - loss: 7.0241e-06 - acc: 2.2222e-04 - val_loss: 1.9720e-06 - val_acc: 0.0000e+00
Epoch 151/400
0s - loss: 4.9347e-06 - acc: 2.2222e-04 - val_loss: 4.6532e-06 - val_acc: 0.0000e+00
Epoch 152/400
0s - loss: 6.6416e-06 - acc: 2.2222e-04 - val_loss: 3.0919e-06 - val_acc: 0.0000e+00
Epoch 153/400
0s - loss: 7.2336e-06 - acc: 2.2222e-04 - val_loss: 5.1188e-06 - val_acc: 0.0000e+00
Epoch 154/400
0s - loss: 1.6862e-05 - acc: 2.2222e-04 - val_loss: 4.8318e-05 - val_acc: 0.0000e+00
Epoch 155/400
0s - loss: 9.8496e-05 - acc: 2.2222e-04 - val_loss: 1.1354e-04 - val_acc: 0.0000e+00
Epoch 156/400
0s - loss: 3.1324e-05 - acc: 2.2222e-04 - val_loss: 1.7106e-05 - val_acc: 0.0000e+00
Epoch 157/400
0s - loss: 2.6712e-05 - acc: 2.2222e-04 - val_loss: 5.5162e-06 - val_acc: 0.0000e+00
Epoch 158/400
0s - loss: 3.2051e-05 - acc: 2.2222e-04 - val_loss: 2.0569e-05 - val_acc: 0.0000e+00
Epoch 159/400
0s - loss: 3.7273e-05 - acc: 2.2222e-04 - val_loss: 5.9224e-06 - val_acc: 0.0000e+00
Epoch 160/400
Epoch 00159: val_loss did not improve
0s - loss: 1.4103e-05 - acc: 2.2222e-04 - val_loss: 2.5672e-05 - val_acc: 0.0000e+00
Epoch 161/400
0s - loss: 1.0590e-05 - acc: 2.2222e-04 - val_loss: 2.8971e-06 - val_acc: 0.0000e+00
Epoch 162/400
0s - loss: 5.6834e-06 - acc: 2.2222e-04 - val_loss: 2.0996e-06 - val_acc: 0.0000e+00
Epoch 163/400
0s - loss: 1.2559e-05 - acc: 2.2222e-04 - val_loss: 4.9170e-06 - val_acc: 0.0000e+00
Epoch 164/400
0s - loss: 9.0405e-06 - acc: 2.2222e-04 - val_loss: 9.2271e-06 - val_acc: 0.0000e+00
Epoch 165/400
0s - loss: 6.6554e-06 - acc: 2.2222e-04 - val_loss: 2.2981e-05 - val_acc: 0.0000e+00
Epoch 166/400
0s - loss: 1.5689e-05 - acc: 2.2222e-04 - val_loss: 1.5318e-05 - val_acc: 0.0000e+00
Epoch 167/400
0s - loss: 3.3387e-05 - acc: 2.2222e-04 - val_loss: 2.5545e-05 - val_acc: 0.0000e+00
Epoch 168/400
0s - loss: 1.1411e-05 - acc: 2.2222e-04 - val_loss: 9.1130e-06 - val_acc: 0.0000e+00
Epoch 169/400
0s - loss: 2.0656e-05 - acc: 2.2222e-04 - val_loss: 1.1192e-04 - val_acc: 0.0000e+00
Epoch 170/400
Epoch 00169: val_loss did not improve
0s - loss: 8.6409e-05 - acc: 2.2222e-04 - val_loss: 2.6385e-05 - val_acc: 0.0000e+00
Epoch 171/400
0s - loss: 6.4773e-05 - acc: 2.2222e-04 - val_loss: 4.5315e-05 - val_acc: 0.0000e+00
Epoch 172/400
0s - loss: 2.9608e-05 - acc: 2.2222e-04 - val_loss: 4.9796e-05 - val_acc: 0.0000e+00
Epoch 173/400
0s - loss: 4.6671e-05 - acc: 2.2222e-04 - val_loss: 2.2178e-05 - val_acc: 0.0000e+00
Epoch 174/400
0s - loss: 2.6737e-05 - acc: 2.2222e-04 - val_loss: 2.1264e-05 - val_acc: 0.0000e+00
Epoch 175/400
0s - loss: 1.1781e-05 - acc: 2.2222e-04 - val_loss: 5.4494e-06 - val_acc: 0.0000e+00
Epoch 176/400
0s - loss: 1.7282e-05 - acc: 2.2222e-04 - val_loss: 1.0048e-05 - val_acc: 0.0000e+00
Epoch 177/400
0s - loss: 1.1201e-05 - acc: 2.2222e-04 - val_loss: 7.1601e-06 - val_acc: 0.0000e+00
Epoch 178/400
0s - loss: 1.2371e-05 - acc: 2.2222e-04 - val_loss: 1.9000e-05 - val_acc: 0.0000e+00
Epoch 179/400
0s - loss: 3.4496e-05 - acc: 2.2222e-04 - val_loss: 2.3981e-06 - val_acc: 0.0000e+00
Epoch 180/400
Epoch 00179: val_loss improved from 0.00000 to 0.00000, saving model to ./tmp/weights.best.hdf5
0s - loss: 1.8729e-05 - acc: 2.2222e-04 - val_loss: 1.8669e-06 - val_acc: 0.0000e+00
Epoch 181/400
0s - loss: 7.5636e-06 - acc: 2.2222e-04 - val_loss: 2.5502e-06 - val_acc: 0.0000e+00
Epoch 182/400
0s - loss: 5.3677e-06 - acc: 2.2222e-04 - val_loss: 1.4539e-05 - val_acc: 0.0000e+00
Epoch 183/400
0s - loss: 9.6965e-06 - acc: 2.2222e-04 - val_loss: 3.4879e-06 - val_acc: 0.0000e+00
Epoch 184/400
0s - loss: 7.6026e-06 - acc: 2.2222e-04 - val_loss: 2.2866e-05 - val_acc: 0.0000e+00
Epoch 185/400
0s - loss: 1.4266e-05 - acc: 2.2222e-04 - val_loss: 1.5055e-06 - val_acc: 0.0000e+00
Epoch 186/400
0s - loss: 9.7210e-06 - acc: 2.2222e-04 - val_loss: 1.5579e-05 - val_acc: 0.0000e+00
Epoch 187/400
0s - loss: 2.0504e-05 - acc: 2.2222e-04 - val_loss: 1.2416e-06 - val_acc: 0.0000e+00
Epoch 188/400
0s - loss: 1.8511e-05 - acc: 2.2222e-04 - val_loss: 5.6011e-05 - val_acc: 0.0000e+00
Epoch 189/400
0s - loss: 6.8389e-05 - acc: 2.2222e-04 - val_loss: 1.4462e-05 - val_acc: 0.0000e+00
Epoch 190/400
Epoch 00189: val_loss did not improve
0s - loss: 9.7880e-06 - acc: 2.2222e-04 - val_loss: 7.9516e-06 - val_acc: 0.0000e+00
Epoch 191/400
0s - loss: 8.8730e-06 - acc: 2.2222e-04 - val_loss: 2.0928e-06 - val_acc: 0.0000e+00
Epoch 192/400
0s - loss: 8.1518e-06 - acc: 2.2222e-04 - val_loss: 3.7806e-06 - val_acc: 0.0000e+00
Epoch 193/400
0s - loss: 9.2051e-06 - acc: 2.2222e-04 - val_loss: 3.2350e-05 - val_acc: 0.0000e+00
Epoch 194/400
0s - loss: 1.6511e-05 - acc: 2.2222e-04 - val_loss: 1.5186e-05 - val_acc: 0.0000e+00
Epoch 195/400
0s - loss: 2.2772e-05 - acc: 2.2222e-04 - val_loss: 4.6330e-06 - val_acc: 0.0000e+00
Epoch 196/400
0s - loss: 1.2880e-05 - acc: 2.2222e-04 - val_loss: 3.2715e-06 - val_acc: 0.0000e+00
Epoch 197/400
0s - loss: 7.5666e-05 - acc: 2.2222e-04 - val_loss: 7.1228e-05 - val_acc: 0.0000e+00
Epoch 198/400
0s - loss: 3.9501e-05 - acc: 2.2222e-04 - val_loss: 8.1141e-05 - val_acc: 0.0000e+00
Epoch 199/400
0s - loss: 4.3605e-05 - acc: 2.2222e-04 - val_loss: 1.5466e-05 - val_acc: 0.0000e+00
Epoch 200/400
Epoch 00199: val_loss did not improve
0s - loss: 3.6756e-05 - acc: 2.2222e-04 - val_loss: 5.2314e-06 - val_acc: 0.0000e+00
Epoch 201/400
0s - loss: 1.5486e-05 - acc: 2.2222e-04 - val_loss: 4.3019e-06 - val_acc: 0.0000e+00
Epoch 202/400
0s - loss: 2.2377e-05 - acc: 2.2222e-04 - val_loss: 2.1887e-05 - val_acc: 0.0000e+00
Epoch 203/400
0s - loss: 2.4416e-05 - acc: 2.2222e-04 - val_loss: 7.8604e-06 - val_acc: 0.0000e+00
Epoch 204/400
0s - loss: 7.2550e-06 - acc: 2.2222e-04 - val_loss: 1.1620e-06 - val_acc: 0.0000e+00
Epoch 205/400
0s - loss: 6.4412e-06 - acc: 2.2222e-04 - val_loss: 9.5103e-06 - val_acc: 0.0000e+00
Epoch 206/400
0s - loss: 6.3300e-06 - acc: 2.2222e-04 - val_loss: 5.1433e-06 - val_acc: 0.0000e+00
Epoch 207/400
0s - loss: 1.4241e-05 - acc: 2.2222e-04 - val_loss: 2.0837e-05 - val_acc: 0.0000e+00
Epoch 208/400
0s - loss: 3.4027e-05 - acc: 2.2222e-04 - val_loss: 8.8091e-06 - val_acc: 0.0000e+00
Epoch 209/400
0s - loss: 2.4405e-05 - acc: 2.2222e-04 - val_loss: 9.2574e-06 - val_acc: 0.0000e+00
Epoch 210/400
Epoch 00209: val_loss did not improve
0s - loss: 1.4441e-05 - acc: 2.2222e-04 - val_loss: 2.8271e-06 - val_acc: 0.0000e+00
Epoch 211/400
0s - loss: 3.3487e-06 - acc: 2.2222e-04 - val_loss: 1.8456e-06 - val_acc: 0.0000e+00
Epoch 212/400
0s - loss: 1.2476e-05 - acc: 2.2222e-04 - val_loss: 1.3619e-06 - val_acc: 0.0000e+00
Epoch 213/400
0s - loss: 8.6163e-06 - acc: 2.2222e-04 - val_loss: 1.5749e-05 - val_acc: 0.0000e+00
Epoch 214/400
0s - loss: 1.7516e-05 - acc: 2.2222e-04 - val_loss: 5.0628e-05 - val_acc: 0.0000e+00
Epoch 215/400
0s - loss: 3.1466e-05 - acc: 2.2222e-04 - val_loss: 2.4337e-06 - val_acc: 0.0000e+00
Epoch 216/400
0s - loss: 4.5964e-05 - acc: 2.2222e-04 - val_loss: 8.0426e-05 - val_acc: 0.0000e+00
Epoch 217/400
0s - loss: 4.2901e-05 - acc: 2.2222e-04 - val_loss: 7.9856e-06 - val_acc: 0.0000e+00
Epoch 218/400
0s - loss: 1.2258e-05 - acc: 2.2222e-04 - val_loss: 8.5305e-06 - val_acc: 0.0000e+00
Epoch 219/400
0s - loss: 3.9849e-05 - acc: 2.2222e-04 - val_loss: 4.0777e-06 - val_acc: 0.0000e+00
Epoch 220/400
Epoch 00219: val_loss did not improve
0s - loss: 9.8898e-06 - acc: 2.2222e-04 - val_loss: 1.1084e-05 - val_acc: 0.0000e+00
Epoch 221/400
0s - loss: 1.2158e-05 - acc: 2.2222e-04 - val_loss: 1.1029e-05 - val_acc: 0.0000e+00
Epoch 222/400
0s - loss: 5.5510e-06 - acc: 2.2222e-04 - val_loss: 1.3766e-05 - val_acc: 0.0000e+00
Epoch 223/400
0s - loss: 4.1624e-05 - acc: 2.2222e-04 - val_loss: 8.0337e-06 - val_acc: 0.0000e+00
Epoch 224/400
0s - loss: 2.9063e-05 - acc: 2.2222e-04 - val_loss: 1.8097e-05 - val_acc: 0.0000e+00
Epoch 225/400
0s - loss: 1.3707e-05 - acc: 2.2222e-04 - val_loss: 1.0213e-05 - val_acc: 0.0000e+00
Epoch 226/400
0s - loss: 1.3108e-05 - acc: 2.2222e-04 - val_loss: 2.2584e-05 - val_acc: 0.0000e+00
Epoch 227/400
0s - loss: 2.1857e-05 - acc: 2.2222e-04 - val_loss: 8.7734e-05 - val_acc: 0.0000e+00
Epoch 228/400
0s - loss: 7.2046e-05 - acc: 2.2222e-04 - val_loss: 7.8324e-05 - val_acc: 0.0000e+00
Epoch 229/400
0s - loss: 7.3078e-05 - acc: 2.2222e-04 - val_loss: 4.3280e-05 - val_acc: 0.0000e+00
Epoch 230/400
Epoch 00229: val_loss did not improve
0s - loss: 3.7595e-05 - acc: 2.2222e-04 - val_loss: 1.3574e-05 - val_acc: 0.0000e+00
Epoch 231/400
0s - loss: 1.9145e-05 - acc: 2.2222e-04 - val_loss: 1.0966e-05 - val_acc: 0.0000e+00
Epoch 232/400
0s - loss: 7.3605e-06 - acc: 2.2222e-04 - val_loss: 7.5098e-06 - val_acc: 0.0000e+00
Epoch 233/400
0s - loss: 1.5652e-05 - acc: 2.2222e-04 - val_loss: 1.0632e-05 - val_acc: 0.0000e+00
Epoch 234/400
0s - loss: 2.6471e-05 - acc: 2.2222e-04 - val_loss: 2.3064e-05 - val_acc: 0.0000e+00
Epoch 235/400
0s - loss: 3.1788e-05 - acc: 2.2222e-04 - val_loss: 3.7637e-05 - val_acc: 0.0000e+00
Epoch 236/400
0s - loss: 3.8288e-05 - acc: 2.2222e-04 - val_loss: 4.0811e-05 - val_acc: 0.0000e+00
Epoch 237/400
0s - loss: 3.3411e-05 - acc: 2.2222e-04 - val_loss: 8.1914e-06 - val_acc: 0.0000e+00
Epoch 238/400
0s - loss: 2.5007e-05 - acc: 2.2222e-04 - val_loss: 3.5849e-05 - val_acc: 0.0000e+00
Epoch 239/400
0s - loss: 2.5615e-05 - acc: 2.2222e-04 - val_loss: 1.1669e-05 - val_acc: 0.0000e+00
Epoch 240/400
Epoch 00239: val_loss did not improve
0s - loss: 9.0168e-06 - acc: 2.2222e-04 - val_loss: 5.3240e-06 - val_acc: 0.0000e+00
Epoch 241/400
0s - loss: 6.5328e-06 - acc: 2.2222e-04 - val_loss: 2.4205e-06 - val_acc: 0.0000e+00
Epoch 242/400
0s - loss: 3.3731e-06 - acc: 2.2222e-04 - val_loss: 3.7493e-06 - val_acc: 0.0000e+00
Epoch 243/400
0s - loss: 8.0874e-06 - acc: 2.2222e-04 - val_loss: 3.3328e-06 - val_acc: 0.0000e+00
Epoch 244/400
0s - loss: 4.6481e-06 - acc: 2.2222e-04 - val_loss: 3.9193e-06 - val_acc: 0.0000e+00
Epoch 245/400
0s - loss: 5.9055e-06 - acc: 2.2222e-04 - val_loss: 1.8610e-06 - val_acc: 0.0000e+00
Epoch 246/400
0s - loss: 6.0594e-06 - acc: 2.2222e-04 - val_loss: 2.2021e-06 - val_acc: 0.0000e+00
Epoch 247/400
0s - loss: 5.0315e-06 - acc: 2.2222e-04 - val_loss: 1.6871e-05 - val_acc: 0.0000e+00
Epoch 248/400
0s - loss: 5.9091e-05 - acc: 2.2222e-04 - val_loss: 1.5528e-06 - val_acc: 0.0000e+00
Epoch 249/400
0s - loss: 7.9492e-06 - acc: 2.2222e-04 - val_loss: 6.6578e-06 - val_acc: 0.0000e+00
Epoch 250/400
Epoch 00249: val_loss did not improve
0s - loss: 1.1302e-05 - acc: 2.2222e-04 - val_loss: 1.3599e-05 - val_acc: 0.0000e+00
Epoch 251/400
0s - loss: 2.2147e-05 - acc: 2.2222e-04 - val_loss: 1.3322e-05 - val_acc: 0.0000e+00
Epoch 252/400
0s - loss: 1.1030e-05 - acc: 2.2222e-04 - val_loss: 4.1026e-06 - val_acc: 0.0000e+00
Epoch 253/400
0s - loss: 5.2894e-06 - acc: 2.2222e-04 - val_loss: 1.0144e-06 - val_acc: 0.0000e+00
Epoch 254/400
0s - loss: 4.4190e-06 - acc: 2.2222e-04 - val_loss: 2.7410e-06 - val_acc: 0.0000e+00
Epoch 255/400
0s - loss: 6.1590e-06 - acc: 2.2222e-04 - val_loss: 2.8869e-06 - val_acc: 0.0000e+00
Epoch 256/400
0s - loss: 6.1230e-05 - acc: 2.2222e-04 - val_loss: 1.2215e-04 - val_acc: 0.0000e+00
Epoch 257/400
0s - loss: 4.0080e-05 - acc: 2.2222e-04 - val_loss: 2.7476e-05 - val_acc: 0.0000e+00
Epoch 258/400
0s - loss: 1.4729e-05 - acc: 2.2222e-04 - val_loss: 1.0125e-05 - val_acc: 0.0000e+00
Epoch 259/400
0s - loss: 9.0536e-06 - acc: 2.2222e-04 - val_loss: 1.1441e-05 - val_acc: 0.0000e+00
Epoch 260/400
Epoch 00259: val_loss did not improve
0s - loss: 2.2770e-05 - acc: 2.2222e-04 - val_loss: 6.6057e-06 - val_acc: 0.0000e+00
Epoch 261/400
0s - loss: 5.8461e-06 - acc: 2.2222e-04 - val_loss: 2.7736e-06 - val_acc: 0.0000e+00
Epoch 262/400
0s - loss: 6.8085e-06 - acc: 2.2222e-04 - val_loss: 1.3941e-06 - val_acc: 0.0000e+00
Epoch 263/400
0s - loss: 5.7614e-06 - acc: 2.2222e-04 - val_loss: 2.7130e-05 - val_acc: 0.0000e+00
Epoch 264/400
0s - loss: 1.1914e-04 - acc: 2.2222e-04 - val_loss: 3.1290e-05 - val_acc: 0.0000e+00
Epoch 265/400
0s - loss: 5.6925e-05 - acc: 2.2222e-04 - val_loss: 4.4586e-05 - val_acc: 0.0000e+00
Epoch 266/400
0s - loss: 1.8508e-05 - acc: 2.2222e-04 - val_loss: 2.9211e-06 - val_acc: 0.0000e+00
Epoch 267/400
0s - loss: 9.1834e-06 - acc: 2.2222e-04 - val_loss: 1.1052e-05 - val_acc: 0.0000e+00
Epoch 268/400
0s - loss: 1.5300e-05 - acc: 2.2222e-04 - val_loss: 2.9669e-05 - val_acc: 0.0000e+00
Epoch 269/400
0s - loss: 9.6494e-06 - acc: 2.2222e-04 - val_loss: 1.2190e-06 - val_acc: 0.0000e+00
Epoch 270/400
Epoch 00269: val_loss did not improve
0s - loss: 4.8365e-06 - acc: 2.2222e-04 - val_loss: 8.2458e-06 - val_acc: 0.0000e+00
Epoch 271/400
0s - loss: 5.2235e-06 - acc: 2.2222e-04 - val_loss: 1.4339e-06 - val_acc: 0.0000e+00
Epoch 272/400
0s - loss: 1.0674e-05 - acc: 2.2222e-04 - val_loss: 3.3615e-06 - val_acc: 0.0000e+00
Epoch 273/400
0s - loss: 1.0246e-05 - acc: 2.2222e-04 - val_loss: 1.4365e-05 - val_acc: 0.0000e+00
Epoch 274/400
0s - loss: 1.6344e-05 - acc: 2.2222e-04 - val_loss: 1.1241e-05 - val_acc: 0.0000e+00
Epoch 275/400
0s - loss: 4.0135e-05 - acc: 2.2222e-04 - val_loss: 2.2005e-05 - val_acc: 0.0000e+00
Epoch 276/400
0s - loss: 4.7029e-05 - acc: 2.2222e-04 - val_loss: 1.3487e-05 - val_acc: 0.0000e+00
Epoch 277/400
0s - loss: 1.5398e-05 - acc: 2.2222e-04 - val_loss: 1.7471e-05 - val_acc: 0.0000e+00
Epoch 278/400
0s - loss: 1.4510e-05 - acc: 2.2222e-04 - val_loss: 1.9510e-05 - val_acc: 0.0000e+00
Epoch 279/400
0s - loss: 1.7474e-05 - acc: 2.2222e-04 - val_loss: 1.9458e-05 - val_acc: 0.0000e+00
Epoch 280/400
Epoch 00279: val_loss did not improve
0s - loss: 1.4428e-05 - acc: 2.2222e-04 - val_loss: 4.9060e-06 - val_acc: 0.0000e+00
Epoch 281/400
0s - loss: 1.9767e-05 - acc: 2.2222e-04 - val_loss: 6.8264e-05 - val_acc: 0.0000e+00
Epoch 282/400
0s - loss: 3.8712e-05 - acc: 2.2222e-04 - val_loss: 2.4681e-05 - val_acc: 0.0000e+00
Epoch 283/400
0s - loss: 1.3282e-05 - acc: 2.2222e-04 - val_loss: 1.1782e-05 - val_acc: 0.0000e+00
Epoch 284/400
0s - loss: 6.1607e-06 - acc: 2.2222e-04 - val_loss: 1.7184e-05 - val_acc: 0.0000e+00
Epoch 285/400
0s - loss: 9.2193e-06 - acc: 2.2222e-04 - val_loss: 9.1591e-06 - val_acc: 0.0000e+00
Epoch 286/400
0s - loss: 4.1446e-06 - acc: 2.2222e-04 - val_loss: 6.9591e-06 - val_acc: 0.0000e+00
Epoch 287/400
0s - loss: 6.5289e-06 - acc: 2.2222e-04 - val_loss: 1.8065e-06 - val_acc: 0.0000e+00
Epoch 288/400
0s - loss: 1.0761e-05 - acc: 2.2222e-04 - val_loss: 1.6386e-05 - val_acc: 0.0000e+00
Epoch 289/400
0s - loss: 4.4285e-05 - acc: 2.2222e-04 - val_loss: 7.8957e-05 - val_acc: 0.0000e+00
Epoch 290/400
Epoch 00289: val_loss did not improve
0s - loss: 4.6095e-05 - acc: 2.2222e-04 - val_loss: 2.6387e-05 - val_acc: 0.0000e+00
Epoch 291/400
0s - loss: 7.1130e-05 - acc: 2.2222e-04 - val_loss: 1.7857e-05 - val_acc: 0.0000e+00
Epoch 292/400
0s - loss: 9.0014e-05 - acc: 2.2222e-04 - val_loss: 9.2980e-05 - val_acc: 0.0000e+00
Epoch 293/400
0s - loss: 3.9068e-05 - acc: 2.2222e-04 - val_loss: 5.6018e-05 - val_acc: 0.0000e+00
Epoch 294/400
0s - loss: 5.1050e-05 - acc: 2.2222e-04 - val_loss: 5.4436e-06 - val_acc: 0.0000e+00
Epoch 295/400
0s - loss: 2.6518e-05 - acc: 2.2222e-04 - val_loss: 3.6853e-05 - val_acc: 0.0000e+00
Epoch 296/400
0s - loss: 4.3505e-05 - acc: 2.2222e-04 - val_loss: 5.4588e-05 - val_acc: 0.0000e+00
Epoch 297/400
0s - loss: 2.4856e-05 - acc: 2.2222e-04 - val_loss: 1.1960e-05 - val_acc: 0.0000e+00
Epoch 298/400
0s - loss: 1.3868e-05 - acc: 2.2222e-04 - val_loss: 7.2522e-06 - val_acc: 0.0000e+00
Epoch 299/400
0s - loss: 8.5696e-06 - acc: 2.2222e-04 - val_loss: 1.2093e-05 - val_acc: 0.0000e+00
Epoch 300/400
Epoch 00299: val_loss did not improve
0s - loss: 8.5067e-06 - acc: 2.2222e-04 - val_loss: 2.9987e-06 - val_acc: 0.0000e+00
Epoch 301/400
0s - loss: 5.1061e-06 - acc: 2.2222e-04 - val_loss: 1.0945e-05 - val_acc: 0.0000e+00
Epoch 302/400
0s - loss: 9.0706e-06 - acc: 2.2222e-04 - val_loss: 2.0182e-06 - val_acc: 0.0000e+00
Epoch 303/400
0s - loss: 8.0755e-06 - acc: 2.2222e-04 - val_loss: 2.7434e-05 - val_acc: 0.0000e+00
Epoch 304/400
0s - loss: 3.4291e-05 - acc: 2.2222e-04 - val_loss: 6.4650e-06 - val_acc: 0.0000e+00
Epoch 305/400
0s - loss: 1.2354e-05 - acc: 2.2222e-04 - val_loss: 1.4859e-05 - val_acc: 0.0000e+00
Epoch 306/400
0s - loss: 1.0513e-05 - acc: 2.2222e-04 - val_loss: 4.5193e-06 - val_acc: 0.0000e+00
Epoch 307/400
0s - loss: 1.2356e-05 - acc: 2.2222e-04 - val_loss: 1.2691e-05 - val_acc: 0.0000e+00
Epoch 308/400
0s - loss: 7.7081e-06 - acc: 2.2222e-04 - val_loss: 2.4547e-06 - val_acc: 0.0000e+00
Epoch 309/400
0s - loss: 7.8506e-06 - acc: 2.2222e-04 - val_loss: 8.7061e-06 - val_acc: 0.0000e+00
Epoch 310/400
Epoch 00309: val_loss did not improve
0s - loss: 7.6887e-06 - acc: 2.2222e-04 - val_loss: 1.2716e-05 - val_acc: 0.0000e+00
Epoch 311/400
0s - loss: 8.3648e-06 - acc: 2.2222e-04 - val_loss: 5.5908e-06 - val_acc: 0.0000e+00
Epoch 312/400
0s - loss: 7.0690e-06 - acc: 2.2222e-04 - val_loss: 2.7410e-06 - val_acc: 0.0000e+00
Epoch 313/400
0s - loss: 2.2473e-05 - acc: 2.2222e-04 - val_loss: 9.2084e-06 - val_acc: 0.0000e+00
Epoch 314/400
0s - loss: 8.1919e-06 - acc: 2.2222e-04 - val_loss: 2.2819e-05 - val_acc: 0.0000e+00
Epoch 315/400
0s - loss: 3.8796e-05 - acc: 2.2222e-04 - val_loss: 3.9371e-05 - val_acc: 0.0000e+00
Epoch 316/400
0s - loss: 3.9650e-05 - acc: 2.2222e-04 - val_loss: 3.3496e-05 - val_acc: 0.0000e+00
Epoch 317/400
0s - loss: 2.2213e-05 - acc: 2.2222e-04 - val_loss: 3.5061e-06 - val_acc: 0.0000e+00
Epoch 318/400
0s - loss: 3.8002e-05 - acc: 2.2222e-04 - val_loss: 1.1591e-05 - val_acc: 0.0000e+00
Epoch 319/400
0s - loss: 6.1054e-05 - acc: 2.2222e-04 - val_loss: 5.3489e-05 - val_acc: 0.0000e+00
Epoch 320/400
Epoch 00319: val_loss did not improve
0s - loss: 2.8932e-05 - acc: 2.2222e-04 - val_loss: 2.0434e-05 - val_acc: 0.0000e+00
Epoch 321/400
0s - loss: 1.3401e-05 - acc: 2.2222e-04 - val_loss: 1.0306e-06 - val_acc: 0.0000e+00
Epoch 322/400
0s - loss: 6.0594e-06 - acc: 2.2222e-04 - val_loss: 1.1129e-05 - val_acc: 0.0000e+00
Epoch 323/400
0s - loss: 7.4222e-06 - acc: 2.2222e-04 - val_loss: 2.3806e-06 - val_acc: 0.0000e+00
Epoch 324/400
0s - loss: 8.7890e-06 - acc: 2.2222e-04 - val_loss: 1.6444e-05 - val_acc: 0.0000e+00
Epoch 325/400
0s - loss: 1.2194e-05 - acc: 2.2222e-04 - val_loss: 1.4132e-06 - val_acc: 0.0000e+00
Epoch 326/400
0s - loss: 3.4958e-06 - acc: 2.2222e-04 - val_loss: 2.5857e-06 - val_acc: 0.0000e+00
Epoch 327/400
0s - loss: 2.8614e-06 - acc: 2.2222e-04 - val_loss: 4.8897e-06 - val_acc: 0.0000e+00
Epoch 328/400
0s - loss: 1.4402e-05 - acc: 2.2222e-04 - val_loss: 1.8604e-06 - val_acc: 0.0000e+00
Epoch 329/400
0s - loss: 1.8779e-05 - acc: 2.2222e-04 - val_loss: 7.3605e-05 - val_acc: 0.0000e+00
Epoch 330/400
Epoch 00329: val_loss did not improve
0s - loss: 5.6752e-05 - acc: 2.2222e-04 - val_loss: 8.6934e-06 - val_acc: 0.0000e+00
Epoch 331/400
0s - loss: 3.4701e-05 - acc: 2.2222e-04 - val_loss: 5.0811e-05 - val_acc: 0.0000e+00
Epoch 332/400
0s - loss: 3.6734e-05 - acc: 2.2222e-04 - val_loss: 2.3089e-06 - val_acc: 0.0000e+00
Epoch 333/400
0s - loss: 1.6503e-05 - acc: 2.2222e-04 - val_loss: 9.4401e-06 - val_acc: 0.0000e+00
Epoch 334/400
0s - loss: 2.3663e-05 - acc: 2.2222e-04 - val_loss: 1.4317e-05 - val_acc: 0.0000e+00
Epoch 335/400
0s - loss: 2.2494e-05 - acc: 2.2222e-04 - val_loss: 1.9877e-05 - val_acc: 0.0000e+00
Epoch 336/400
0s - loss: 2.2846e-05 - acc: 2.2222e-04 - val_loss: 6.4423e-06 - val_acc: 0.0000e+00
Epoch 337/400
0s - loss: 2.0832e-05 - acc: 2.2222e-04 - val_loss: 3.3920e-05 - val_acc: 0.0000e+00
Epoch 338/400
0s - loss: 2.0034e-05 - acc: 2.2222e-04 - val_loss: 3.7780e-06 - val_acc: 0.0000e+00
Epoch 339/400
0s - loss: 1.0842e-05 - acc: 2.2222e-04 - val_loss: 1.8275e-05 - val_acc: 0.0000e+00
Epoch 340/400
Epoch 00339: val_loss did not improve
0s - loss: 1.4200e-05 - acc: 2.2222e-04 - val_loss: 5.2363e-06 - val_acc: 0.0000e+00
Epoch 341/400
0s - loss: 1.0370e-05 - acc: 2.2222e-04 - val_loss: 5.1448e-06 - val_acc: 0.0000e+00
Epoch 342/400
0s - loss: 7.0538e-06 - acc: 2.2222e-04 - val_loss: 6.5615e-06 - val_acc: 0.0000e+00
Epoch 343/400
0s - loss: 5.5291e-06 - acc: 2.2222e-04 - val_loss: 9.9423e-06 - val_acc: 0.0000e+00
Epoch 344/400
0s - loss: 8.5701e-06 - acc: 2.2222e-04 - val_loss: 4.4435e-06 - val_acc: 0.0000e+00
Epoch 345/400
0s - loss: 1.8724e-05 - acc: 2.2222e-04 - val_loss: 1.9569e-05 - val_acc: 0.0000e+00
Epoch 346/400
0s - loss: 9.5322e-06 - acc: 2.2222e-04 - val_loss: 2.6169e-06 - val_acc: 0.0000e+00
Epoch 347/400
0s - loss: 6.0957e-06 - acc: 2.2222e-04 - val_loss: 3.3216e-06 - val_acc: 0.0000e+00
Epoch 348/400
0s - loss: 6.2731e-06 - acc: 2.2222e-04 - val_loss: 1.6784e-05 - val_acc: 0.0000e+00
Epoch 349/400
0s - loss: 7.4453e-06 - acc: 2.2222e-04 - val_loss: 2.0416e-06 - val_acc: 0.0000e+00
Epoch 350/400
Epoch 00349: val_loss did not improve
0s - loss: 3.0830e-06 - acc: 2.2222e-04 - val_loss: 4.1181e-06 - val_acc: 0.0000e+00
Epoch 351/400
0s - loss: 6.0862e-06 - acc: 2.2222e-04 - val_loss: 2.1780e-05 - val_acc: 0.0000e+00
Epoch 352/400
0s - loss: 1.2879e-05 - acc: 2.2222e-04 - val_loss: 1.5044e-05 - val_acc: 0.0000e+00
Epoch 353/400
0s - loss: 9.4699e-06 - acc: 2.2222e-04 - val_loss: 3.5323e-06 - val_acc: 0.0000e+00
Epoch 354/400
0s - loss: 5.1525e-06 - acc: 2.2222e-04 - val_loss: 1.8079e-05 - val_acc: 0.0000e+00
Epoch 355/400
0s - loss: 9.1698e-06 - acc: 2.2222e-04 - val_loss: 5.8908e-07 - val_acc: 0.0000e+00
Epoch 356/400
0s - loss: 1.9376e-05 - acc: 2.2222e-04 - val_loss: 3.6877e-06 - val_acc: 0.0000e+00
Epoch 357/400
0s - loss: 8.7375e-06 - acc: 2.2222e-04 - val_loss: 8.0496e-06 - val_acc: 0.0000e+00
Epoch 358/400
0s - loss: 1.3462e-05 - acc: 2.2222e-04 - val_loss: 4.8138e-06 - val_acc: 0.0000e+00
Epoch 359/400
0s - loss: 3.8916e-06 - acc: 2.2222e-04 - val_loss: 6.9763e-06 - val_acc: 0.0000e+00
Epoch 360/400
Epoch 00359: val_loss did not improve
0s - loss: 9.2080e-06 - acc: 2.2222e-04 - val_loss: 2.5023e-06 - val_acc: 0.0000e+00
Epoch 361/400
0s - loss: 4.9821e-06 - acc: 2.2222e-04 - val_loss: 4.0806e-06 - val_acc: 0.0000e+00
Epoch 362/400
0s - loss: 1.3648e-04 - acc: 2.2222e-04 - val_loss: 1.4058e-05 - val_acc: 0.0000e+00
Epoch 363/400
0s - loss: 4.8507e-05 - acc: 2.2222e-04 - val_loss: 2.3574e-05 - val_acc: 0.0000e+00
Epoch 364/400
0s - loss: 1.6868e-05 - acc: 2.2222e-04 - val_loss: 2.8968e-06 - val_acc: 0.0000e+00
Epoch 365/400
0s - loss: 6.8019e-06 - acc: 2.2222e-04 - val_loss: 1.3316e-05 - val_acc: 0.0000e+00
Epoch 366/400
0s - loss: 8.6725e-06 - acc: 2.2222e-04 - val_loss: 4.6853e-06 - val_acc: 0.0000e+00
Epoch 367/400
0s - loss: 3.5418e-06 - acc: 2.2222e-04 - val_loss: 1.5504e-06 - val_acc: 0.0000e+00
Epoch 368/400
0s - loss: 2.8268e-06 - acc: 2.2222e-04 - val_loss: 1.1193e-06 - val_acc: 0.0000e+00
Epoch 369/400
0s - loss: 7.0940e-06 - acc: 2.2222e-04 - val_loss: 5.9892e-06 - val_acc: 0.0000e+00
Epoch 370/400
Epoch 00369: val_loss did not improve
0s - loss: 8.8968e-06 - acc: 2.2222e-04 - val_loss: 4.7475e-06 - val_acc: 0.0000e+00
Epoch 371/400
0s - loss: 5.3246e-06 - acc: 2.2222e-04 - val_loss: 6.9050e-06 - val_acc: 0.0000e+00
Epoch 372/400
0s - loss: 7.5164e-06 - acc: 2.2222e-04 - val_loss: 1.1904e-05 - val_acc: 0.0000e+00
Epoch 373/400
0s - loss: 9.8912e-06 - acc: 2.2222e-04 - val_loss: 2.4574e-06 - val_acc: 0.0000e+00
Epoch 374/400
0s - loss: 3.2662e-06 - acc: 2.2222e-04 - val_loss: 8.1060e-06 - val_acc: 0.0000e+00
Epoch 375/400
0s - loss: 9.6802e-06 - acc: 2.2222e-04 - val_loss: 9.2142e-06 - val_acc: 0.0000e+00
Epoch 376/400
0s - loss: 1.1648e-05 - acc: 2.2222e-04 - val_loss: 3.0198e-05 - val_acc: 0.0000e+00
Epoch 377/400
0s - loss: 1.6553e-05 - acc: 2.2222e-04 - val_loss: 1.8039e-05 - val_acc: 0.0000e+00
Epoch 378/400
0s - loss: 1.0282e-05 - acc: 2.2222e-04 - val_loss: 1.3532e-06 - val_acc: 0.0000e+00
Epoch 379/400
0s - loss: 4.0401e-05 - acc: 2.2222e-04 - val_loss: 5.0416e-05 - val_acc: 0.0000e+00
Epoch 380/400
Epoch 00379: val_loss did not improve
0s - loss: 3.1550e-05 - acc: 2.2222e-04 - val_loss: 2.9397e-05 - val_acc: 0.0000e+00
Epoch 381/400
0s - loss: 1.1837e-05 - acc: 2.2222e-04 - val_loss: 1.2562e-06 - val_acc: 0.0000e+00
Epoch 382/400
0s - loss: 6.0024e-06 - acc: 2.2222e-04 - val_loss: 2.9131e-06 - val_acc: 0.0000e+00
Epoch 383/400
0s - loss: 1.1165e-05 - acc: 2.2222e-04 - val_loss: 2.0274e-05 - val_acc: 0.0000e+00
Epoch 384/400
0s - loss: 1.7980e-05 - acc: 2.2222e-04 - val_loss: 4.1363e-05 - val_acc: 0.0000e+00
Epoch 385/400
0s - loss: 1.7217e-05 - acc: 2.2222e-04 - val_loss: 7.1718e-06 - val_acc: 0.0000e+00
Epoch 386/400
0s - loss: 4.4817e-06 - acc: 2.2222e-04 - val_loss: 1.6806e-06 - val_acc: 0.0000e+00
Epoch 387/400
0s - loss: 5.0643e-06 - acc: 2.2222e-04 - val_loss: 6.1507e-06 - val_acc: 0.0000e+00
Epoch 388/400
0s - loss: 3.4393e-06 - acc: 2.2222e-04 - val_loss: 7.8526e-07 - val_acc: 0.0000e+00
Epoch 389/400
0s - loss: 4.9542e-06 - acc: 2.2222e-04 - val_loss: 7.6916e-07 - val_acc: 0.0000e+00
Epoch 390/400
Epoch 00389: val_loss did not improve
0s - loss: 7.5733e-06 - acc: 2.2222e-04 - val_loss: 2.0029e-06 - val_acc: 0.0000e+00
Epoch 391/400
0s - loss: 5.1106e-06 - acc: 2.2222e-04 - val_loss: 1.3258e-06 - val_acc: 0.0000e+00
Epoch 392/400
0s - loss: 5.0292e-06 - acc: 2.2222e-04 - val_loss: 3.6110e-06 - val_acc: 0.0000e+00
Epoch 393/400
0s - loss: 3.1283e-05 - acc: 2.2222e-04 - val_loss: 8.8862e-05 - val_acc: 0.0000e+00
Epoch 394/400
0s - loss: 5.9781e-05 - acc: 2.2222e-04 - val_loss: 8.9128e-05 - val_acc: 0.0000e+00
Epoch 395/400
0s - loss: 7.4100e-05 - acc: 2.2222e-04 - val_loss: 2.3876e-05 - val_acc: 0.0000e+00
Epoch 396/400
0s - loss: 3.0672e-05 - acc: 2.2222e-04 - val_loss: 2.3241e-05 - val_acc: 0.0000e+00
Epoch 397/400
0s - loss: 5.8555e-05 - acc: 2.2222e-04 - val_loss: 2.6122e-05 - val_acc: 0.0000e+00
Epoch 398/400
0s - loss: 7.8915e-05 - acc: 2.2222e-04 - val_loss: 1.5910e-04 - val_acc: 0.0000e+00
Epoch 399/400
0s - loss: 8.9828e-05 - acc: 2.2222e-04 - val_loss: 2.7146e-05 - val_acc: 0.0000e+00
Epoch 400/400
Epoch 00399: val_loss did not improve
0s - loss: 3.4298e-05 - acc: 2.2222e-04 - val_loss: 3.3883e-06 - val_acc: 0.0000e+00
In [11]:
# loss
fig = plt.figure()
plt.semilogy(history.history['loss'])
if vsplit:
plt.semilogy(history.history['val_loss'])
plt.title('mse')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper right')
Out[11]:
<matplotlib.legend.Legend at 0x2b8ed73dfb70>
In [13]:
model.load_weights("./tmp/weights.best.hdf5")
#test_points = [0.6, 0.7, 0.8, 0.9, 1.]
test_points = [1.02, 1.05, 1.1, 1.2, 1.5]
rho_predict = []
rho_test = []
for x_p in test_points:
T_P_test = np.append(T_test, np.ones((len(T_test), 1)) * (x_p - P_min) / (P_max - P_min), axis=1)
predict = model.predict(T_P_test)
rho_ref = np.asarray([CP.PropsSI('D', 'T', x_T, 'P', x_p * p_c, fluid) for x_T in T_vec])
rho_ref = rhoTP_scaler.transform(rho_ref.reshape(-1, 1))
rho_predict.append(predict)
rho_test.append(rho_ref)
In [19]:
# 1.Plot actual vs prediction for training set
fig = plt.figure()
for prdt, ref in zip(rho_predict, rho_test):
plt.plot(T_scaler.inverse_transform(T_test), rhoTP_scaler.inverse_transform(prdt), 'b-')
plt.plot(T_scaler.inverse_transform(T_test), rhoTP_scaler.inverse_transform(ref), 'r:')
plt.legend(['predict', 'CoolProp'], loc='upper right')
plt.title(test_points)
Out[19]:
<matplotlib.text.Text at 0x2b8ef29f4898>
In [18]:
# 2.L2 accuracy plot
# Compute R-Square value for training set
from sklearn.metrics import r2_score
a = np.asarray(rho_predict).reshape(-1, 1)
b = np.asarray(rho_test).reshape(-1, 1)
TestR2Value = r2_score(a, b)
print("Training Set R-Square=", TestR2Value)
fig = plt.figure()
plt.plot(a, b, 'k^', ms=3, mfc='none')
plt.title('R2 ='+str(TestR2Value))
Training Set R-Square= 0.999996356213
Out[18]:
<matplotlib.text.Text at 0x2b8ed782b748>
In [ ]:
Content source: uqyge/combustionML
Similar notebooks: