Graduate School/Neural Network
LSTM을 이용한 주식 가격 예측
- -
728x90
반응형
Import Library¶
In [1]:
import FinanceDataReader as fdr
from sklearn.preprocessing import MinMaxScaler
import torch
import time
import matplotlib.pyplot as plt
%matplotlib inline
Define LSTM model¶
In [2]:
class LSTM(torch.nn.Module) :
def __init__(self, num_classes, input_size, hidden_size, num_layers, seq_length, device) :
super(LSTM, self).__init__()
self.num_classes = num_classes #number of classes
self.num_layers = num_layers # number of layers
self.input_size = input_size # input size(= number of column)
self.hidden_size = hidden_size # number of hidden layer's neuron
self.seq_length = seq_length # sequence length
self.lstm = torch.nn.LSTM(self.input_size, self.hidden_size, self.num_layers, batch_first=True) # LSTM
self.fc_1 = torch.nn.Linear(hidden_size, 128) # fully connected layer
self.fc_2 = torch.nn.Linear(128, num_classes) # output layer
self.activation = torch.nn.Tanh() # activation function
self.device = device
def forward(self, x) : # forward propagation
h_0 = torch.autograd.Variable(torch.zeros(self.num_layers, x.size(0), self.hidden_size)).to(self.device) # hidden state
c_0 = torch.autograd.Variable(torch.zeros(self.num_layers, x.size(0), self.hidden_size)).to(self.device) # cell state
# Propagate input through LSTM
output, (hn, cn) = self.lstm(x, (h_0, c_0)) # lstm with input, hidden, and cell state
hn = hn.view(-1, self.hidden_size) # reshaping the data for Dense layer next
out = self.activation(hn)
out = self.fc_1(out)
out = self.activation(out)
out = self.fc_2(out)
return out
In [3]:
def split_values_target(dataset, sequence_length):
values = [] # values = input sequence(its length = sequence_length)
target = [] # target = next value of input sequence
for i in range(len(dataset)-sequence_length):
values.append(dataset[i:i+sequence_length])
target.append(dataset[i+sequence_length])
return torch.as_tensor(values), torch.as_tensor(target)
Set ML device¶
In [4]:
device = "cpu" # for CPU based
torch.manual_seed(0) # fix random-seed
if torch.cuda.is_available(): # for nVIDIA based
device = "cuda:0"
torch.cuda.manual_seed_all(0) # fix random-seed
elif torch.backends.mps.is_available(): # for ARM based
device = "mps"
Stock data¶
In [5]:
stock_info = {"Kakao" : "035720",
"Samsung Electronics" : "005930",
"Samsung SDI" : "006400",
"Hotel Shilla" : "008770",
"KEPCO" : "015760",
"SK Hynix" : "005930",
"Amorepacific Corporation" : "090430",
"Lotte Shopping" : "023530"}
stock = "Hotel Shilla" # select stock
price_kinds = ["Open", "High", "Low", "Close"]
price_select = price_kinds[0] # use open price
Get stock data¶
In [6]:
stock_prices = fdr.DataReader(stock_info[stock], start="2018-01-01") # get stock prices(= data)
dates = stock_prices.index.strftime("%Y-%m-%d") # data's index(= dates)
scaler = MinMaxScaler(feature_range=(0, 1)) # create scaler for learning
data = scaler.fit_transform(stock_prices[[price_select]]) # data rescale
Parameter for create dataset¶
In [7]:
test_size = 200
sequence_length = 30
test_case_index = -1
Seperate data [train, test, input(x), answer(target; y)]¶
In [8]:
train_data = data[:-test_size]
test_data = data[-test_size:]
x_train, y_train = split_values_target(train_data, sequence_length)
x_test, y_test = split_values_target(test_data, sequence_length)
/tmp/ipykernel_904519/3415685560.py:7: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at /opt/conda/conda-bld/pytorch_1659484806139/work/torch/csrc/utils/tensor_new.cpp:201.) return torch.as_tensor(values), torch.as_tensor(target)
Tensor manipulation(reshape, send to gpu, type change, ...)¶
In [9]:
x_train = x_train.type(torch.float).view([-1, 1, sequence_length]).to(device) # [whole-test_size, 1, sequence_length]
y_train = y_train.type(torch.float).to(device)
x_test = x_test.type(torch.float).view([-1, 1, sequence_length]).to(device) # [test_size, 1, sequence_length]
y_test = y_test.type(torch.float)
Hyper-parameter¶
In [10]:
input_size = sequence_length # sequence length
hidden_size = 2 # number of hidden layer's neuron
num_layers = 1 # number of LSTM layer
num_classes = 1 # number of class
num_epoch = 1000 # number of epoch
learning_rate = 1e-3 # learning step size
Create model¶
In [11]:
model = LSTM(num_classes, input_size, hidden_size, num_layers, x_train.shape[1], device).to(device)
criterion = torch.nn.MSELoss().to(device) # set loss functions
optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate) # set activation function
Model learning¶
In [12]:
losses = []
for epoch in range(num_epoch) :
start_time = time.perf_counter()
outputs = model.forward(x_train) # forward propagation
optimizer.zero_grad()
loss = criterion(outputs, y_train) # get loss
losses.append(loss.item())
loss.backward() # backward propagation
optimizer.step() # weight update
end_time = time.perf_counter()
elapsed_time = "%ds %dms"%(int(end_time-start_time), int((end_time-start_time-int(end_time-start_time))*1000))
print(f"Epoch {epoch+1:4d}/{num_epoch:3d} - {elapsed_time}/step - loss: {loss.item():.6f}")
Epoch 1/1000 - 0s 299ms/step - loss: 0.248477 Epoch 2/1000 - 0s 3ms/step - loss: 0.202510 Epoch 3/1000 - 0s 3ms/step - loss: 0.162129 Epoch 4/1000 - 0s 3ms/step - loss: 0.127383 Epoch 5/1000 - 0s 3ms/step - loss: 0.098260 Epoch 6/1000 - 0s 3ms/step - loss: 0.074668 Epoch 7/1000 - 0s 3ms/step - loss: 0.056417 Epoch 8/1000 - 0s 3ms/step - loss: 0.043205 Epoch 9/1000 - 0s 3ms/step - loss: 0.034599 Epoch 10/1000 - 0s 3ms/step - loss: 0.030026 Epoch 11/1000 - 0s 3ms/step - loss: 0.028782 Epoch 12/1000 - 0s 3ms/step - loss: 0.030060 Epoch 13/1000 - 0s 4ms/step - loss: 0.032996 Epoch 14/1000 - 0s 4ms/step - loss: 0.036744 Epoch 15/1000 - 0s 4ms/step - loss: 0.040550 Epoch 16/1000 - 0s 4ms/step - loss: 0.043811 Epoch 17/1000 - 0s 4ms/step - loss: 0.046120 Epoch 18/1000 - 0s 4ms/step - loss: 0.047270 Epoch 19/1000 - 0s 4ms/step - loss: 0.047236 Epoch 20/1000 - 0s 4ms/step - loss: 0.046137 Epoch 21/1000 - 0s 4ms/step - loss: 0.044191 Epoch 22/1000 - 0s 4ms/step - loss: 0.041671 Epoch 23/1000 - 0s 4ms/step - loss: 0.038865 Epoch 24/1000 - 0s 4ms/step - loss: 0.036045 Epoch 25/1000 - 0s 4ms/step - loss: 0.033442 Epoch 26/1000 - 0s 4ms/step - loss: 0.031230 Epoch 27/1000 - 0s 4ms/step - loss: 0.029521 Epoch 28/1000 - 0s 4ms/step - loss: 0.028357 Epoch 29/1000 - 0s 4ms/step - loss: 0.027723 Epoch 30/1000 - 0s 4ms/step - loss: 0.027547 Epoch 31/1000 - 0s 4ms/step - loss: 0.027726 Epoch 32/1000 - 0s 4ms/step - loss: 0.028131 Epoch 33/1000 - 0s 4ms/step - loss: 0.028632 Epoch 34/1000 - 0s 4ms/step - loss: 0.029109 Epoch 35/1000 - 0s 4ms/step - loss: 0.029466 Epoch 36/1000 - 0s 4ms/step - loss: 0.029638 Epoch 37/1000 - 0s 4ms/step - loss: 0.029595 Epoch 38/1000 - 0s 5ms/step - loss: 0.029340 Epoch 39/1000 - 0s 4ms/step - loss: 0.028900 Epoch 40/1000 - 0s 4ms/step - loss: 0.028325 Epoch 41/1000 - 0s 5ms/step - loss: 0.027674 Epoch 42/1000 - 0s 5ms/step - loss: 0.027007 Epoch 43/1000 - 0s 5ms/step - loss: 0.026377 Epoch 44/1000 - 0s 5ms/step - loss: 0.025825 Epoch 45/1000 - 0s 5ms/step - loss: 0.025377 Epoch 46/1000 - 0s 5ms/step - loss: 0.025040 Epoch 47/1000 - 0s 6ms/step - loss: 0.024804 Epoch 48/1000 - 0s 6ms/step - loss: 0.024649 Epoch 49/1000 - 0s 6ms/step - loss: 0.024544 Epoch 50/1000 - 0s 5ms/step - loss: 0.024458 Epoch 51/1000 - 0s 5ms/step - loss: 0.024359 Epoch 52/1000 - 0s 4ms/step - loss: 0.024224 Epoch 53/1000 - 0s 4ms/step - loss: 0.024037 Epoch 54/1000 - 0s 4ms/step - loss: 0.023792 Epoch 55/1000 - 0s 5ms/step - loss: 0.023492 Epoch 56/1000 - 0s 4ms/step - loss: 0.023150 Epoch 57/1000 - 0s 4ms/step - loss: 0.022779 Epoch 58/1000 - 0s 5ms/step - loss: 0.022398 Epoch 59/1000 - 0s 5ms/step - loss: 0.022021 Epoch 60/1000 - 0s 4ms/step - loss: 0.021661 Epoch 61/1000 - 0s 5ms/step - loss: 0.021325 Epoch 62/1000 - 0s 4ms/step - loss: 0.021013 Epoch 63/1000 - 0s 4ms/step - loss: 0.020723 Epoch 64/1000 - 0s 5ms/step - loss: 0.020448 Epoch 65/1000 - 0s 4ms/step - loss: 0.020180 Epoch 66/1000 - 0s 4ms/step - loss: 0.019909 Epoch 67/1000 - 0s 4ms/step - loss: 0.019630 Epoch 68/1000 - 0s 4ms/step - loss: 0.019338 Epoch 69/1000 - 0s 4ms/step - loss: 0.019034 Epoch 70/1000 - 0s 4ms/step - loss: 0.018719 Epoch 71/1000 - 0s 4ms/step - loss: 0.018399 Epoch 72/1000 - 0s 4ms/step - loss: 0.018081 Epoch 73/1000 - 0s 4ms/step - loss: 0.017770 Epoch 74/1000 - 0s 4ms/step - loss: 0.017471 Epoch 75/1000 - 0s 4ms/step - loss: 0.017188 Epoch 76/1000 - 0s 4ms/step - loss: 0.016922 Epoch 77/1000 - 0s 4ms/step - loss: 0.016672 Epoch 78/1000 - 0s 4ms/step - loss: 0.016436 Epoch 79/1000 - 0s 4ms/step - loss: 0.016210 Epoch 80/1000 - 0s 4ms/step - loss: 0.015992 Epoch 81/1000 - 0s 4ms/step - loss: 0.015779 Epoch 82/1000 - 0s 4ms/step - loss: 0.015570 Epoch 83/1000 - 0s 4ms/step - loss: 0.015366 Epoch 84/1000 - 0s 4ms/step - loss: 0.015168 Epoch 85/1000 - 0s 5ms/step - loss: 0.014980 Epoch 86/1000 - 0s 4ms/step - loss: 0.014803 Epoch 87/1000 - 0s 4ms/step - loss: 0.014639 Epoch 88/1000 - 0s 4ms/step - loss: 0.014488 Epoch 89/1000 - 0s 4ms/step - loss: 0.014351 Epoch 90/1000 - 0s 4ms/step - loss: 0.014225 Epoch 91/1000 - 0s 4ms/step - loss: 0.014109 Epoch 92/1000 - 0s 4ms/step - loss: 0.014000 Epoch 93/1000 - 0s 4ms/step - loss: 0.013897 Epoch 94/1000 - 0s 4ms/step - loss: 0.013799 Epoch 95/1000 - 0s 4ms/step - loss: 0.013704 Epoch 96/1000 - 0s 4ms/step - loss: 0.013614 Epoch 97/1000 - 0s 4ms/step - loss: 0.013527 Epoch 98/1000 - 0s 4ms/step - loss: 0.013444 Epoch 99/1000 - 0s 4ms/step - loss: 0.013364 Epoch 100/1000 - 0s 4ms/step - loss: 0.013286 Epoch 101/1000 - 0s 4ms/step - loss: 0.013209 Epoch 102/1000 - 0s 4ms/step - loss: 0.013132 Epoch 103/1000 - 0s 4ms/step - loss: 0.013054 Epoch 104/1000 - 0s 4ms/step - loss: 0.012974 Epoch 105/1000 - 0s 4ms/step - loss: 0.012893 Epoch 106/1000 - 0s 5ms/step - loss: 0.012810 Epoch 107/1000 - 0s 4ms/step - loss: 0.012725 Epoch 108/1000 - 0s 4ms/step - loss: 0.012640 Epoch 109/1000 - 0s 4ms/step - loss: 0.012555 Epoch 110/1000 - 0s 4ms/step - loss: 0.012469 Epoch 111/1000 - 0s 4ms/step - loss: 0.012382 Epoch 112/1000 - 0s 4ms/step - loss: 0.012294 Epoch 113/1000 - 0s 4ms/step - loss: 0.012205 Epoch 114/1000 - 0s 4ms/step - loss: 0.012115 Epoch 115/1000 - 0s 4ms/step - loss: 0.012024 Epoch 116/1000 - 0s 4ms/step - loss: 0.011933 Epoch 117/1000 - 0s 4ms/step - loss: 0.011841 Epoch 118/1000 - 0s 4ms/step - loss: 0.011748 Epoch 119/1000 - 0s 4ms/step - loss: 0.011656 Epoch 120/1000 - 0s 4ms/step - loss: 0.011563 Epoch 121/1000 - 0s 4ms/step - loss: 0.011470 Epoch 122/1000 - 0s 4ms/step - loss: 0.011377 Epoch 123/1000 - 0s 4ms/step - loss: 0.011283 Epoch 124/1000 - 0s 4ms/step - loss: 0.011189 Epoch 125/1000 - 0s 4ms/step - loss: 0.011094 Epoch 126/1000 - 0s 4ms/step - loss: 0.010999 Epoch 127/1000 - 0s 5ms/step - loss: 0.010903 Epoch 128/1000 - 0s 4ms/step - loss: 0.010806 Epoch 129/1000 - 0s 4ms/step - loss: 0.010709 Epoch 130/1000 - 0s 4ms/step - loss: 0.010611 Epoch 131/1000 - 0s 4ms/step - loss: 0.010513 Epoch 132/1000 - 0s 4ms/step - loss: 0.010413 Epoch 133/1000 - 0s 4ms/step - loss: 0.010313 Epoch 134/1000 - 0s 4ms/step - loss: 0.010211 Epoch 135/1000 - 0s 4ms/step - loss: 0.010108 Epoch 136/1000 - 0s 4ms/step - loss: 0.010005 Epoch 137/1000 - 0s 4ms/step - loss: 0.009900 Epoch 138/1000 - 0s 4ms/step - loss: 0.009795 Epoch 139/1000 - 0s 4ms/step - loss: 0.009688 Epoch 140/1000 - 0s 4ms/step - loss: 0.009580 Epoch 141/1000 - 0s 4ms/step - loss: 0.009472 Epoch 142/1000 - 0s 4ms/step - loss: 0.009362 Epoch 143/1000 - 0s 4ms/step - loss: 0.009252 Epoch 144/1000 - 0s 4ms/step - loss: 0.009140 Epoch 145/1000 - 0s 4ms/step - loss: 0.009027 Epoch 146/1000 - 0s 4ms/step - loss: 0.008914 Epoch 147/1000 - 0s 4ms/step - loss: 0.008799 Epoch 148/1000 - 0s 4ms/step - loss: 0.008684 Epoch 149/1000 - 0s 4ms/step - loss: 0.008567 Epoch 150/1000 - 0s 4ms/step - loss: 0.008450 Epoch 151/1000 - 0s 4ms/step - loss: 0.008332 Epoch 152/1000 - 0s 4ms/step - loss: 0.008213 Epoch 153/1000 - 0s 4ms/step - loss: 0.008093 Epoch 154/1000 - 0s 4ms/step - loss: 0.007973 Epoch 155/1000 - 0s 4ms/step - loss: 0.007852 Epoch 156/1000 - 0s 4ms/step - loss: 0.007730 Epoch 157/1000 - 0s 4ms/step - loss: 0.007608 Epoch 158/1000 - 0s 4ms/step - loss: 0.007485 Epoch 159/1000 - 0s 4ms/step - loss: 0.007362 Epoch 160/1000 - 0s 4ms/step - loss: 0.007238 Epoch 161/1000 - 0s 4ms/step - loss: 0.007114 Epoch 162/1000 - 0s 5ms/step - loss: 0.006990 Epoch 163/1000 - 0s 4ms/step - loss: 0.006867 Epoch 164/1000 - 0s 4ms/step - loss: 0.006743 Epoch 165/1000 - 0s 4ms/step - loss: 0.006619 Epoch 166/1000 - 0s 4ms/step - loss: 0.006496 Epoch 167/1000 - 0s 5ms/step - loss: 0.006374 Epoch 168/1000 - 0s 5ms/step - loss: 0.006252 Epoch 169/1000 - 0s 4ms/step - loss: 0.006131 Epoch 170/1000 - 0s 4ms/step - loss: 0.006012 Epoch 171/1000 - 0s 4ms/step - loss: 0.005893 Epoch 172/1000 - 0s 4ms/step - loss: 0.005777 Epoch 173/1000 - 0s 5ms/step - loss: 0.005662 Epoch 174/1000 - 0s 5ms/step - loss: 0.005549 Epoch 175/1000 - 0s 4ms/step - loss: 0.005438 Epoch 176/1000 - 0s 5ms/step - loss: 0.005329 Epoch 177/1000 - 0s 5ms/step - loss: 0.005224 Epoch 178/1000 - 0s 5ms/step - loss: 0.005121 Epoch 179/1000 - 0s 5ms/step - loss: 0.005021 Epoch 180/1000 - 0s 4ms/step - loss: 0.004925 Epoch 181/1000 - 0s 4ms/step - loss: 0.004832 Epoch 182/1000 - 0s 4ms/step - loss: 0.004742 Epoch 183/1000 - 0s 4ms/step - loss: 0.004657 Epoch 184/1000 - 0s 4ms/step - loss: 0.004575 Epoch 185/1000 - 0s 4ms/step - loss: 0.004497 Epoch 186/1000 - 0s 4ms/step - loss: 0.004423 Epoch 187/1000 - 0s 4ms/step - loss: 0.004353 Epoch 188/1000 - 0s 4ms/step - loss: 0.004286 Epoch 189/1000 - 0s 5ms/step - loss: 0.004224 Epoch 190/1000 - 0s 4ms/step - loss: 0.004166 Epoch 191/1000 - 0s 4ms/step - loss: 0.004111 Epoch 192/1000 - 0s 4ms/step - loss: 0.004060 Epoch 193/1000 - 0s 4ms/step - loss: 0.004012 Epoch 194/1000 - 0s 4ms/step - loss: 0.003967 Epoch 195/1000 - 0s 4ms/step - loss: 0.003926 Epoch 196/1000 - 0s 4ms/step - loss: 0.003887 Epoch 197/1000 - 0s 4ms/step - loss: 0.003850 Epoch 198/1000 - 0s 4ms/step - loss: 0.003816 Epoch 199/1000 - 0s 4ms/step - loss: 0.003784 Epoch 200/1000 - 0s 4ms/step - loss: 0.003754 Epoch 201/1000 - 0s 4ms/step - loss: 0.003725 Epoch 202/1000 - 0s 4ms/step - loss: 0.003698 Epoch 203/1000 - 0s 4ms/step - loss: 0.003672 Epoch 204/1000 - 0s 4ms/step - loss: 0.003647 Epoch 205/1000 - 0s 4ms/step - loss: 0.003623 Epoch 206/1000 - 0s 4ms/step - loss: 0.003600 Epoch 207/1000 - 0s 4ms/step - loss: 0.003578 Epoch 208/1000 - 0s 4ms/step - loss: 0.003556 Epoch 209/1000 - 0s 4ms/step - loss: 0.003535 Epoch 210/1000 - 0s 4ms/step - loss: 0.003515 Epoch 211/1000 - 0s 4ms/step - loss: 0.003495 Epoch 212/1000 - 0s 4ms/step - loss: 0.003476 Epoch 213/1000 - 0s 4ms/step - loss: 0.003457 Epoch 214/1000 - 0s 4ms/step - loss: 0.003439 Epoch 215/1000 - 0s 4ms/step - loss: 0.003421 Epoch 216/1000 - 0s 4ms/step - loss: 0.003404 Epoch 217/1000 - 0s 4ms/step - loss: 0.003388 Epoch 218/1000 - 0s 4ms/step - loss: 0.003372 Epoch 219/1000 - 0s 4ms/step - loss: 0.003356 Epoch 220/1000 - 0s 4ms/step - loss: 0.003341 Epoch 221/1000 - 0s 5ms/step - loss: 0.003327 Epoch 222/1000 - 0s 4ms/step - loss: 0.003313 Epoch 223/1000 - 0s 4ms/step - loss: 0.003299 Epoch 224/1000 - 0s 5ms/step - loss: 0.003286 Epoch 225/1000 - 0s 4ms/step - loss: 0.003273 Epoch 226/1000 - 0s 4ms/step - loss: 0.003261 Epoch 227/1000 - 0s 4ms/step - loss: 0.003249 Epoch 228/1000 - 0s 4ms/step - loss: 0.003238 Epoch 229/1000 - 0s 4ms/step - loss: 0.003226 Epoch 230/1000 - 0s 4ms/step - loss: 0.003215 Epoch 231/1000 - 0s 4ms/step - loss: 0.003205 Epoch 232/1000 - 0s 4ms/step - loss: 0.003194 Epoch 233/1000 - 0s 4ms/step - loss: 0.003184 Epoch 234/1000 - 0s 4ms/step - loss: 0.003174 Epoch 235/1000 - 0s 4ms/step - loss: 0.003164 Epoch 236/1000 - 0s 4ms/step - loss: 0.003155 Epoch 237/1000 - 0s 4ms/step - loss: 0.003145 Epoch 238/1000 - 0s 4ms/step - loss: 0.003136 Epoch 239/1000 - 0s 4ms/step - loss: 0.003127 Epoch 240/1000 - 0s 4ms/step - loss: 0.003118 Epoch 241/1000 - 0s 4ms/step - loss: 0.003109 Epoch 242/1000 - 0s 4ms/step - loss: 0.003101 Epoch 243/1000 - 0s 4ms/step - loss: 0.003092 Epoch 244/1000 - 0s 4ms/step - loss: 0.003084 Epoch 245/1000 - 0s 4ms/step - loss: 0.003076 Epoch 246/1000 - 0s 4ms/step - loss: 0.003067 Epoch 247/1000 - 0s 4ms/step - loss: 0.003059 Epoch 248/1000 - 0s 5ms/step - loss: 0.003051 Epoch 249/1000 - 0s 5ms/step - loss: 0.003043 Epoch 250/1000 - 0s 5ms/step - loss: 0.003036 Epoch 251/1000 - 0s 4ms/step - loss: 0.003028 Epoch 252/1000 - 0s 4ms/step - loss: 0.003020 Epoch 253/1000 - 0s 4ms/step - loss: 0.003013 Epoch 254/1000 - 0s 4ms/step - loss: 0.003006 Epoch 255/1000 - 0s 4ms/step - loss: 0.002998 Epoch 256/1000 - 0s 4ms/step - loss: 0.002991 Epoch 257/1000 - 0s 4ms/step - loss: 0.002984 Epoch 258/1000 - 0s 4ms/step - loss: 0.002977 Epoch 259/1000 - 0s 4ms/step - loss: 0.002970 Epoch 260/1000 - 0s 4ms/step - loss: 0.002963 Epoch 261/1000 - 0s 4ms/step - loss: 0.002956 Epoch 262/1000 - 0s 5ms/step - loss: 0.002950 Epoch 263/1000 - 0s 4ms/step - loss: 0.002943 Epoch 264/1000 - 0s 4ms/step - loss: 0.002936 Epoch 265/1000 - 0s 4ms/step - loss: 0.002930 Epoch 266/1000 - 0s 4ms/step - loss: 0.002923 Epoch 267/1000 - 0s 4ms/step - loss: 0.002917 Epoch 268/1000 - 0s 4ms/step - loss: 0.002910 Epoch 269/1000 - 0s 4ms/step - loss: 0.002904 Epoch 270/1000 - 0s 4ms/step - loss: 0.002898 Epoch 271/1000 - 0s 4ms/step - loss: 0.002891 Epoch 272/1000 - 0s 4ms/step - loss: 0.002885 Epoch 273/1000 - 0s 4ms/step - loss: 0.002879 Epoch 274/1000 - 0s 4ms/step - loss: 0.002873 Epoch 275/1000 - 0s 4ms/step - loss: 0.002867 Epoch 276/1000 - 0s 4ms/step - loss: 0.002861 Epoch 277/1000 - 0s 4ms/step - loss: 0.002855 Epoch 278/1000 - 0s 4ms/step - loss: 0.002849 Epoch 279/1000 - 0s 4ms/step - loss: 0.002843 Epoch 280/1000 - 0s 4ms/step - loss: 0.002837 Epoch 281/1000 - 0s 4ms/step - loss: 0.002832 Epoch 282/1000 - 0s 4ms/step - loss: 0.002826 Epoch 283/1000 - 0s 5ms/step - loss: 0.002820 Epoch 284/1000 - 0s 4ms/step - loss: 0.002814 Epoch 285/1000 - 0s 4ms/step - loss: 0.002809 Epoch 286/1000 - 0s 4ms/step - loss: 0.002803 Epoch 287/1000 - 0s 4ms/step - loss: 0.002798 Epoch 288/1000 - 0s 4ms/step - loss: 0.002792 Epoch 289/1000 - 0s 5ms/step - loss: 0.002787 Epoch 290/1000 - 0s 4ms/step - loss: 0.002781 Epoch 291/1000 - 0s 4ms/step - loss: 0.002776 Epoch 292/1000 - 0s 4ms/step - loss: 0.002770 Epoch 293/1000 - 0s 4ms/step - loss: 0.002765 Epoch 294/1000 - 0s 4ms/step - loss: 0.002760 Epoch 295/1000 - 0s 4ms/step - loss: 0.002754 Epoch 296/1000 - 0s 4ms/step - loss: 0.002749 Epoch 297/1000 - 0s 5ms/step - loss: 0.002744 Epoch 298/1000 - 0s 5ms/step - loss: 0.002739 Epoch 299/1000 - 0s 4ms/step - loss: 0.002734 Epoch 300/1000 - 0s 4ms/step - loss: 0.002729 Epoch 301/1000 - 0s 4ms/step - loss: 0.002723 Epoch 302/1000 - 0s 5ms/step - loss: 0.002718 Epoch 303/1000 - 0s 4ms/step - loss: 0.002713 Epoch 304/1000 - 0s 4ms/step - loss: 0.002708 Epoch 305/1000 - 0s 5ms/step - loss: 0.002703 Epoch 306/1000 - 0s 4ms/step - loss: 0.002698 Epoch 307/1000 - 0s 4ms/step - loss: 0.002693 Epoch 308/1000 - 0s 4ms/step - loss: 0.002689 Epoch 309/1000 - 0s 4ms/step - loss: 0.002684 Epoch 310/1000 - 0s 4ms/step - loss: 0.002679 Epoch 311/1000 - 0s 4ms/step - loss: 0.002674 Epoch 312/1000 - 0s 4ms/step - loss: 0.002669 Epoch 313/1000 - 0s 4ms/step - loss: 0.002664 Epoch 314/1000 - 0s 4ms/step - loss: 0.002660 Epoch 315/1000 - 0s 4ms/step - loss: 0.002655 Epoch 316/1000 - 0s 4ms/step - loss: 0.002650 Epoch 317/1000 - 0s 4ms/step - loss: 0.002646 Epoch 318/1000 - 0s 4ms/step - loss: 0.002641 Epoch 319/1000 - 0s 4ms/step - loss: 0.002636 Epoch 320/1000 - 0s 4ms/step - loss: 0.002632 Epoch 321/1000 - 0s 4ms/step - loss: 0.002627 Epoch 322/1000 - 0s 4ms/step - loss: 0.002623 Epoch 323/1000 - 0s 4ms/step - loss: 0.002618 Epoch 324/1000 - 0s 4ms/step - loss: 0.002613 Epoch 325/1000 - 0s 4ms/step - loss: 0.002609 Epoch 326/1000 - 0s 4ms/step - loss: 0.002604 Epoch 327/1000 - 0s 4ms/step - loss: 0.002600 Epoch 328/1000 - 0s 4ms/step - loss: 0.002596 Epoch 329/1000 - 0s 4ms/step - loss: 0.002591 Epoch 330/1000 - 0s 5ms/step - loss: 0.002587 Epoch 331/1000 - 0s 5ms/step - loss: 0.002582 Epoch 332/1000 - 0s 5ms/step - loss: 0.002578 Epoch 333/1000 - 0s 4ms/step - loss: 0.002574 Epoch 334/1000 - 0s 5ms/step - loss: 0.002569 Epoch 335/1000 - 0s 5ms/step - loss: 0.002565 Epoch 336/1000 - 0s 5ms/step - loss: 0.002561 Epoch 337/1000 - 0s 4ms/step - loss: 0.002557 Epoch 338/1000 - 0s 4ms/step - loss: 0.002552 Epoch 339/1000 - 0s 4ms/step - loss: 0.002548 Epoch 340/1000 - 0s 4ms/step - loss: 0.002544 Epoch 341/1000 - 0s 5ms/step - loss: 0.002540 Epoch 342/1000 - 0s 5ms/step - loss: 0.002536 Epoch 343/1000 - 0s 5ms/step - loss: 0.002531 Epoch 344/1000 - 0s 5ms/step - loss: 0.002527 Epoch 345/1000 - 0s 5ms/step - loss: 0.002523 Epoch 346/1000 - 0s 4ms/step - loss: 0.002519 Epoch 347/1000 - 0s 3ms/step - loss: 0.002515 Epoch 348/1000 - 0s 4ms/step - loss: 0.002511 Epoch 349/1000 - 0s 4ms/step - loss: 0.002507 Epoch 350/1000 - 0s 3ms/step - loss: 0.002503 Epoch 351/1000 - 0s 4ms/step - loss: 0.002499 Epoch 352/1000 - 0s 4ms/step - loss: 0.002495 Epoch 353/1000 - 0s 4ms/step - loss: 0.002491 Epoch 354/1000 - 0s 3ms/step - loss: 0.002487 Epoch 355/1000 - 0s 4ms/step - loss: 0.002483 Epoch 356/1000 - 0s 5ms/step - loss: 0.002479 Epoch 357/1000 - 0s 5ms/step - loss: 0.002475 Epoch 358/1000 - 0s 4ms/step - loss: 0.002471 Epoch 359/1000 - 0s 5ms/step - loss: 0.002467 Epoch 360/1000 - 0s 4ms/step - loss: 0.002463 Epoch 361/1000 - 0s 4ms/step - loss: 0.002459 Epoch 362/1000 - 0s 4ms/step - loss: 0.002456 Epoch 363/1000 - 0s 5ms/step - loss: 0.002452 Epoch 364/1000 - 0s 4ms/step - loss: 0.002448 Epoch 365/1000 - 0s 4ms/step - loss: 0.002444 Epoch 366/1000 - 0s 5ms/step - loss: 0.002440 Epoch 367/1000 - 0s 5ms/step - loss: 0.002437 Epoch 368/1000 - 0s 4ms/step - loss: 0.002433 Epoch 369/1000 - 0s 4ms/step - loss: 0.002429 Epoch 370/1000 - 0s 5ms/step - loss: 0.002425 Epoch 371/1000 - 0s 4ms/step - loss: 0.002421 Epoch 372/1000 - 0s 4ms/step - loss: 0.002418 Epoch 373/1000 - 0s 4ms/step - loss: 0.002414 Epoch 374/1000 - 0s 4ms/step - loss: 0.002410 Epoch 375/1000 - 0s 4ms/step - loss: 0.002407 Epoch 376/1000 - 0s 3ms/step - loss: 0.002403 Epoch 377/1000 - 0s 3ms/step - loss: 0.002399 Epoch 378/1000 - 0s 3ms/step - loss: 0.002396 Epoch 379/1000 - 0s 3ms/step - loss: 0.002392 Epoch 380/1000 - 0s 3ms/step - loss: 0.002388 Epoch 381/1000 - 0s 3ms/step - loss: 0.002385 Epoch 382/1000 - 0s 4ms/step - loss: 0.002381 Epoch 383/1000 - 0s 3ms/step - loss: 0.002378 Epoch 384/1000 - 0s 3ms/step - loss: 0.002374 Epoch 385/1000 - 0s 4ms/step - loss: 0.002371 Epoch 386/1000 - 0s 4ms/step - loss: 0.002367 Epoch 387/1000 - 0s 4ms/step - loss: 0.002363 Epoch 388/1000 - 0s 3ms/step - loss: 0.002360 Epoch 389/1000 - 0s 4ms/step - loss: 0.002356 Epoch 390/1000 - 0s 5ms/step - loss: 0.002353 Epoch 391/1000 - 0s 4ms/step - loss: 0.002349 Epoch 392/1000 - 0s 4ms/step - loss: 0.002346 Epoch 393/1000 - 0s 4ms/step - loss: 0.002342 Epoch 394/1000 - 0s 4ms/step - loss: 0.002339 Epoch 395/1000 - 0s 3ms/step - loss: 0.002335 Epoch 396/1000 - 0s 4ms/step - loss: 0.002332 Epoch 397/1000 - 0s 4ms/step - loss: 0.002329 Epoch 398/1000 - 0s 3ms/step - loss: 0.002325 Epoch 399/1000 - 0s 3ms/step - loss: 0.002322 Epoch 400/1000 - 0s 4ms/step - loss: 0.002318 Epoch 401/1000 - 0s 4ms/step - loss: 0.002315 Epoch 402/1000 - 0s 4ms/step - loss: 0.002312 Epoch 403/1000 - 0s 4ms/step - loss: 0.002308 Epoch 404/1000 - 0s 4ms/step - loss: 0.002305 Epoch 405/1000 - 0s 5ms/step - loss: 0.002302 Epoch 406/1000 - 0s 4ms/step - loss: 0.002298 Epoch 407/1000 - 0s 4ms/step - loss: 0.002295 Epoch 408/1000 - 0s 4ms/step - loss: 0.002292 Epoch 409/1000 - 0s 4ms/step - loss: 0.002288 Epoch 410/1000 - 0s 4ms/step - loss: 0.002285 Epoch 411/1000 - 0s 5ms/step - loss: 0.002282 Epoch 412/1000 - 0s 5ms/step - loss: 0.002278 Epoch 413/1000 - 0s 4ms/step - loss: 0.002275 Epoch 414/1000 - 0s 4ms/step - loss: 0.002272 Epoch 415/1000 - 0s 5ms/step - loss: 0.002269 Epoch 416/1000 - 0s 5ms/step - loss: 0.002265 Epoch 417/1000 - 0s 5ms/step - loss: 0.002262 Epoch 418/1000 - 0s 4ms/step - loss: 0.002259 Epoch 419/1000 - 0s 4ms/step - loss: 0.002256 Epoch 420/1000 - 0s 3ms/step - loss: 0.002252 Epoch 421/1000 - 0s 3ms/step - loss: 0.002249 Epoch 422/1000 - 0s 4ms/step - loss: 0.002246 Epoch 423/1000 - 0s 3ms/step - loss: 0.002243 Epoch 424/1000 - 0s 3ms/step - loss: 0.002240 Epoch 425/1000 - 0s 3ms/step - loss: 0.002236 Epoch 426/1000 - 0s 3ms/step - loss: 0.002233 Epoch 427/1000 - 0s 3ms/step - loss: 0.002230 Epoch 428/1000 - 0s 3ms/step - loss: 0.002227 Epoch 429/1000 - 0s 3ms/step - loss: 0.002224 Epoch 430/1000 - 0s 3ms/step - loss: 0.002221 Epoch 431/1000 - 0s 3ms/step - loss: 0.002218 Epoch 432/1000 - 0s 3ms/step - loss: 0.002215 Epoch 433/1000 - 0s 3ms/step - loss: 0.002211 Epoch 434/1000 - 0s 3ms/step - loss: 0.002208 Epoch 435/1000 - 0s 4ms/step - loss: 0.002205 Epoch 436/1000 - 0s 3ms/step - loss: 0.002202 Epoch 437/1000 - 0s 4ms/step - loss: 0.002199 Epoch 438/1000 - 0s 4ms/step - loss: 0.002196 Epoch 439/1000 - 0s 4ms/step - loss: 0.002193 Epoch 440/1000 - 0s 4ms/step - loss: 0.002190 Epoch 441/1000 - 0s 4ms/step - loss: 0.002187 Epoch 442/1000 - 0s 4ms/step - loss: 0.002184 Epoch 443/1000 - 0s 4ms/step - loss: 0.002181 Epoch 444/1000 - 0s 4ms/step - loss: 0.002178 Epoch 445/1000 - 0s 4ms/step - loss: 0.002175 Epoch 446/1000 - 0s 4ms/step - loss: 0.002172 Epoch 447/1000 - 0s 4ms/step - loss: 0.002169 Epoch 448/1000 - 0s 4ms/step - loss: 0.002166 Epoch 449/1000 - 0s 4ms/step - loss: 0.002163 Epoch 450/1000 - 0s 4ms/step - loss: 0.002160 Epoch 451/1000 - 0s 4ms/step - loss: 0.002157 Epoch 452/1000 - 0s 4ms/step - loss: 0.002154 Epoch 453/1000 - 0s 4ms/step - loss: 0.002151 Epoch 454/1000 - 0s 4ms/step - loss: 0.002148 Epoch 455/1000 - 0s 4ms/step - loss: 0.002145 Epoch 456/1000 - 0s 4ms/step - loss: 0.002142 Epoch 457/1000 - 0s 4ms/step - loss: 0.002139 Epoch 458/1000 - 0s 4ms/step - loss: 0.002137 Epoch 459/1000 - 0s 4ms/step - loss: 0.002134 Epoch 460/1000 - 0s 4ms/step - loss: 0.002131 Epoch 461/1000 - 0s 4ms/step - loss: 0.002128 Epoch 462/1000 - 0s 4ms/step - loss: 0.002125 Epoch 463/1000 - 0s 5ms/step - loss: 0.002122 Epoch 464/1000 - 0s 5ms/step - loss: 0.002119 Epoch 465/1000 - 0s 5ms/step - loss: 0.002116 Epoch 466/1000 - 0s 5ms/step - loss: 0.002114 Epoch 467/1000 - 0s 4ms/step - loss: 0.002111 Epoch 468/1000 - 0s 4ms/step - loss: 0.002108 Epoch 469/1000 - 0s 4ms/step - loss: 0.002105 Epoch 470/1000 - 0s 4ms/step - loss: 0.002102 Epoch 471/1000 - 0s 4ms/step - loss: 0.002099 Epoch 472/1000 - 0s 4ms/step - loss: 0.002097 Epoch 473/1000 - 0s 4ms/step - loss: 0.002094 Epoch 474/1000 - 0s 4ms/step - loss: 0.002091 Epoch 475/1000 - 0s 4ms/step - loss: 0.002088 Epoch 476/1000 - 0s 4ms/step - loss: 0.002086 Epoch 477/1000 - 0s 4ms/step - loss: 0.002083 Epoch 478/1000 - 0s 4ms/step - loss: 0.002080 Epoch 479/1000 - 0s 4ms/step - loss: 0.002077 Epoch 480/1000 - 0s 4ms/step - loss: 0.002075 Epoch 481/1000 - 0s 4ms/step - loss: 0.002072 Epoch 482/1000 - 0s 4ms/step - loss: 0.002069 Epoch 483/1000 - 0s 4ms/step - loss: 0.002066 Epoch 484/1000 - 0s 4ms/step - loss: 0.002064 Epoch 485/1000 - 0s 4ms/step - loss: 0.002061 Epoch 486/1000 - 0s 4ms/step - loss: 0.002058 Epoch 487/1000 - 0s 4ms/step - loss: 0.002055 Epoch 488/1000 - 0s 4ms/step - loss: 0.002053 Epoch 489/1000 - 0s 4ms/step - loss: 0.002050 Epoch 490/1000 - 0s 4ms/step - loss: 0.002047 Epoch 491/1000 - 0s 4ms/step - loss: 0.002045 Epoch 492/1000 - 0s 4ms/step - loss: 0.002042 Epoch 493/1000 - 0s 4ms/step - loss: 0.002039 Epoch 494/1000 - 0s 4ms/step - loss: 0.002037 Epoch 495/1000 - 0s 4ms/step - loss: 0.002034 Epoch 496/1000 - 0s 4ms/step - loss: 0.002031 Epoch 497/1000 - 0s 4ms/step - loss: 0.002029 Epoch 498/1000 - 0s 4ms/step - loss: 0.002026 Epoch 499/1000 - 0s 4ms/step - loss: 0.002024 Epoch 500/1000 - 0s 4ms/step - loss: 0.002021 Epoch 501/1000 - 0s 4ms/step - loss: 0.002018 Epoch 502/1000 - 0s 4ms/step - loss: 0.002016 Epoch 503/1000 - 0s 4ms/step - loss: 0.002013 Epoch 504/1000 - 0s 5ms/step - loss: 0.002011 Epoch 505/1000 - 0s 5ms/step - loss: 0.002008 Epoch 506/1000 - 0s 5ms/step - loss: 0.002005 Epoch 507/1000 - 0s 5ms/step - loss: 0.002003 Epoch 508/1000 - 0s 5ms/step - loss: 0.002000 Epoch 509/1000 - 0s 4ms/step - loss: 0.001998 Epoch 510/1000 - 0s 4ms/step - loss: 0.001995 Epoch 511/1000 - 0s 4ms/step - loss: 0.001993 Epoch 512/1000 - 0s 4ms/step - loss: 0.001990 Epoch 513/1000 - 0s 4ms/step - loss: 0.001988 Epoch 514/1000 - 0s 4ms/step - loss: 0.001985 Epoch 515/1000 - 0s 4ms/step - loss: 0.001983 Epoch 516/1000 - 0s 4ms/step - loss: 0.001980 Epoch 517/1000 - 0s 4ms/step - loss: 0.001978 Epoch 518/1000 - 0s 5ms/step - loss: 0.001975 Epoch 519/1000 - 0s 4ms/step - loss: 0.001973 Epoch 520/1000 - 0s 4ms/step - loss: 0.001970 Epoch 521/1000 - 0s 4ms/step - loss: 0.001968 Epoch 522/1000 - 0s 4ms/step - loss: 0.001965 Epoch 523/1000 - 0s 4ms/step - loss: 0.001963 Epoch 524/1000 - 0s 4ms/step - loss: 0.001960 Epoch 525/1000 - 0s 4ms/step - loss: 0.001958 Epoch 526/1000 - 0s 4ms/step - loss: 0.001955 Epoch 527/1000 - 0s 4ms/step - loss: 0.001953 Epoch 528/1000 - 0s 4ms/step - loss: 0.001950 Epoch 529/1000 - 0s 4ms/step - loss: 0.001948 Epoch 530/1000 - 0s 4ms/step - loss: 0.001945 Epoch 531/1000 - 0s 4ms/step - loss: 0.001943 Epoch 532/1000 - 0s 4ms/step - loss: 0.001941 Epoch 533/1000 - 0s 4ms/step - loss: 0.001938 Epoch 534/1000 - 0s 4ms/step - loss: 0.001936 Epoch 535/1000 - 0s 4ms/step - loss: 0.001933 Epoch 536/1000 - 0s 4ms/step - loss: 0.001931 Epoch 537/1000 - 0s 4ms/step - loss: 0.001929 Epoch 538/1000 - 0s 4ms/step - loss: 0.001926 Epoch 539/1000 - 0s 4ms/step - loss: 0.001924 Epoch 540/1000 - 0s 4ms/step - loss: 0.001922 Epoch 541/1000 - 0s 4ms/step - loss: 0.001919 Epoch 542/1000 - 0s 4ms/step - loss: 0.001917 Epoch 543/1000 - 0s 4ms/step - loss: 0.001914 Epoch 544/1000 - 0s 4ms/step - loss: 0.001912 Epoch 545/1000 - 0s 4ms/step - loss: 0.001910 Epoch 546/1000 - 0s 5ms/step - loss: 0.001907 Epoch 547/1000 - 0s 4ms/step - loss: 0.001905 Epoch 548/1000 - 0s 4ms/step - loss: 0.001903 Epoch 549/1000 - 0s 4ms/step - loss: 0.001900 Epoch 550/1000 - 0s 4ms/step - loss: 0.001898 Epoch 551/1000 - 0s 4ms/step - loss: 0.001896 Epoch 552/1000 - 0s 4ms/step - loss: 0.001894 Epoch 553/1000 - 0s 5ms/step - loss: 0.001891 Epoch 554/1000 - 0s 6ms/step - loss: 0.001889 Epoch 555/1000 - 0s 6ms/step - loss: 0.001887 Epoch 556/1000 - 0s 6ms/step - loss: 0.001884 Epoch 557/1000 - 0s 6ms/step - loss: 0.001882 Epoch 558/1000 - 0s 6ms/step - loss: 0.001880 Epoch 559/1000 - 0s 5ms/step - loss: 0.001878 Epoch 560/1000 - 0s 5ms/step - loss: 0.001875 Epoch 561/1000 - 0s 5ms/step - loss: 0.001873 Epoch 562/1000 - 0s 5ms/step - loss: 0.001871 Epoch 563/1000 - 0s 5ms/step - loss: 0.001869 Epoch 564/1000 - 0s 4ms/step - loss: 0.001866 Epoch 565/1000 - 0s 4ms/step - loss: 0.001864 Epoch 566/1000 - 0s 4ms/step - loss: 0.001862 Epoch 567/1000 - 0s 4ms/step - loss: 0.001860 Epoch 568/1000 - 0s 4ms/step - loss: 0.001858 Epoch 569/1000 - 0s 4ms/step - loss: 0.001855 Epoch 570/1000 - 0s 4ms/step - loss: 0.001853 Epoch 571/1000 - 0s 4ms/step - loss: 0.001851 Epoch 572/1000 - 0s 4ms/step - loss: 0.001849 Epoch 573/1000 - 0s 4ms/step - loss: 0.001847 Epoch 574/1000 - 0s 4ms/step - loss: 0.001845 Epoch 575/1000 - 0s 4ms/step - loss: 0.001842 Epoch 576/1000 - 0s 4ms/step - loss: 0.001840 Epoch 577/1000 - 0s 4ms/step - loss: 0.001838 Epoch 578/1000 - 0s 5ms/step - loss: 0.001836 Epoch 579/1000 - 0s 4ms/step - loss: 0.001834 Epoch 580/1000 - 0s 4ms/step - loss: 0.001832 Epoch 581/1000 - 0s 4ms/step - loss: 0.001830 Epoch 582/1000 - 0s 4ms/step - loss: 0.001827 Epoch 583/1000 - 0s 4ms/step - loss: 0.001825 Epoch 584/1000 - 0s 5ms/step - loss: 0.001823 Epoch 585/1000 - 0s 4ms/step - loss: 0.001821 Epoch 586/1000 - 0s 4ms/step - loss: 0.001819 Epoch 587/1000 - 0s 4ms/step - loss: 0.001817 Epoch 588/1000 - 0s 4ms/step - loss: 0.001815 Epoch 589/1000 - 0s 4ms/step - loss: 0.001813 Epoch 590/1000 - 0s 5ms/step - loss: 0.001811 Epoch 591/1000 - 0s 5ms/step - loss: 0.001809 Epoch 592/1000 - 0s 5ms/step - loss: 0.001807 Epoch 593/1000 - 0s 5ms/step - loss: 0.001805 Epoch 594/1000 - 0s 5ms/step - loss: 0.001802 Epoch 595/1000 - 0s 5ms/step - loss: 0.001800 Epoch 596/1000 - 0s 5ms/step - loss: 0.001798 Epoch 597/1000 - 0s 5ms/step - loss: 0.001796 Epoch 598/1000 - 0s 5ms/step - loss: 0.001794 Epoch 599/1000 - 0s 5ms/step - loss: 0.001792 Epoch 600/1000 - 0s 4ms/step - loss: 0.001790 Epoch 601/1000 - 0s 4ms/step - loss: 0.001788 Epoch 602/1000 - 0s 4ms/step - loss: 0.001786 Epoch 603/1000 - 0s 4ms/step - loss: 0.001784 Epoch 604/1000 - 0s 4ms/step - loss: 0.001782 Epoch 605/1000 - 0s 4ms/step - loss: 0.001780 Epoch 606/1000 - 0s 5ms/step - loss: 0.001778 Epoch 607/1000 - 0s 5ms/step - loss: 0.001776 Epoch 608/1000 - 0s 5ms/step - loss: 0.001774 Epoch 609/1000 - 0s 5ms/step - loss: 0.001772 Epoch 610/1000 - 0s 5ms/step - loss: 0.001771 Epoch 611/1000 - 0s 5ms/step - loss: 0.001769 Epoch 612/1000 - 0s 5ms/step - loss: 0.001767 Epoch 613/1000 - 0s 5ms/step - loss: 0.001765 Epoch 614/1000 - 0s 5ms/step - loss: 0.001763 Epoch 615/1000 - 0s 5ms/step - loss: 0.001761 Epoch 616/1000 - 0s 5ms/step - loss: 0.001759 Epoch 617/1000 - 0s 5ms/step - loss: 0.001757 Epoch 618/1000 - 0s 4ms/step - loss: 0.001755 Epoch 619/1000 - 0s 4ms/step - loss: 0.001753 Epoch 620/1000 - 0s 4ms/step - loss: 0.001751 Epoch 621/1000 - 0s 5ms/step - loss: 0.001749 Epoch 622/1000 - 0s 4ms/step - loss: 0.001748 Epoch 623/1000 - 0s 5ms/step - loss: 0.001746 Epoch 624/1000 - 0s 5ms/step - loss: 0.001744 Epoch 625/1000 - 0s 4ms/step - loss: 0.001742 Epoch 626/1000 - 0s 5ms/step - loss: 0.001740 Epoch 627/1000 - 0s 5ms/step - loss: 0.001738 Epoch 628/1000 - 0s 5ms/step - loss: 0.001736 Epoch 629/1000 - 0s 5ms/step - loss: 0.001735 Epoch 630/1000 - 0s 5ms/step - loss: 0.001733 Epoch 631/1000 - 0s 5ms/step - loss: 0.001731 Epoch 632/1000 - 0s 5ms/step - loss: 0.001729 Epoch 633/1000 - 0s 5ms/step - loss: 0.001727 Epoch 634/1000 - 0s 5ms/step - loss: 0.001726 Epoch 635/1000 - 0s 5ms/step - loss: 0.001724 Epoch 636/1000 - 0s 4ms/step - loss: 0.001722 Epoch 637/1000 - 0s 4ms/step - loss: 0.001720 Epoch 638/1000 - 0s 4ms/step - loss: 0.001718 Epoch 639/1000 - 0s 4ms/step - loss: 0.001717 Epoch 640/1000 - 0s 4ms/step - loss: 0.001715 Epoch 641/1000 - 0s 4ms/step - loss: 0.001713 Epoch 642/1000 - 0s 4ms/step - loss: 0.001711 Epoch 643/1000 - 0s 4ms/step - loss: 0.001710 Epoch 644/1000 - 0s 4ms/step - loss: 0.001708 Epoch 645/1000 - 0s 4ms/step - loss: 0.001706 Epoch 646/1000 - 0s 4ms/step - loss: 0.001704 Epoch 647/1000 - 0s 4ms/step - loss: 0.001703 Epoch 648/1000 - 0s 4ms/step - loss: 0.001701 Epoch 649/1000 - 0s 4ms/step - loss: 0.001699 Epoch 650/1000 - 0s 4ms/step - loss: 0.001697 Epoch 651/1000 - 0s 4ms/step - loss: 0.001696 Epoch 652/1000 - 0s 4ms/step - loss: 0.001694 Epoch 653/1000 - 0s 4ms/step - loss: 0.001692 Epoch 654/1000 - 0s 4ms/step - loss: 0.001691 Epoch 655/1000 - 0s 5ms/step - loss: 0.001689 Epoch 656/1000 - 0s 4ms/step - loss: 0.001687 Epoch 657/1000 - 0s 5ms/step - loss: 0.001686 Epoch 658/1000 - 0s 5ms/step - loss: 0.001684 Epoch 659/1000 - 0s 5ms/step - loss: 0.001682 Epoch 660/1000 - 0s 5ms/step - loss: 0.001681 Epoch 661/1000 - 0s 4ms/step - loss: 0.001679 Epoch 662/1000 - 0s 5ms/step - loss: 0.001677 Epoch 663/1000 - 0s 5ms/step - loss: 0.001676 Epoch 664/1000 - 0s 5ms/step - loss: 0.001674 Epoch 665/1000 - 0s 5ms/step - loss: 0.001672 Epoch 666/1000 - 0s 5ms/step - loss: 0.001671 Epoch 667/1000 - 0s 5ms/step - loss: 0.001669 Epoch 668/1000 - 0s 5ms/step - loss: 0.001668 Epoch 669/1000 - 0s 5ms/step - loss: 0.001666 Epoch 670/1000 - 0s 5ms/step - loss: 0.001664 Epoch 671/1000 - 0s 6ms/step - loss: 0.001663 Epoch 672/1000 - 0s 5ms/step - loss: 0.001661 Epoch 673/1000 - 0s 5ms/step - loss: 0.001660 Epoch 674/1000 - 0s 4ms/step - loss: 0.001658 Epoch 675/1000 - 0s 4ms/step - loss: 0.001656 Epoch 676/1000 - 0s 4ms/step - loss: 0.001655 Epoch 677/1000 - 0s 4ms/step - loss: 0.001653 Epoch 678/1000 - 0s 4ms/step - loss: 0.001652 Epoch 679/1000 - 0s 4ms/step - loss: 0.001650 Epoch 680/1000 - 0s 4ms/step - loss: 0.001649 Epoch 681/1000 - 0s 4ms/step - loss: 0.001647 Epoch 682/1000 - 0s 5ms/step - loss: 0.001646 Epoch 683/1000 - 0s 4ms/step - loss: 0.001644 Epoch 684/1000 - 0s 4ms/step - loss: 0.001643 Epoch 685/1000 - 0s 4ms/step - loss: 0.001641 Epoch 686/1000 - 0s 4ms/step - loss: 0.001640 Epoch 687/1000 - 0s 4ms/step - loss: 0.001638 Epoch 688/1000 - 0s 4ms/step - loss: 0.001637 Epoch 689/1000 - 0s 4ms/step - loss: 0.001635 Epoch 690/1000 - 0s 4ms/step - loss: 0.001634 Epoch 691/1000 - 0s 4ms/step - loss: 0.001632 Epoch 692/1000 - 0s 4ms/step - loss: 0.001631 Epoch 693/1000 - 0s 4ms/step - loss: 0.001629 Epoch 694/1000 - 0s 4ms/step - loss: 0.001628 Epoch 695/1000 - 0s 5ms/step - loss: 0.001626 Epoch 696/1000 - 0s 4ms/step - loss: 0.001625 Epoch 697/1000 - 0s 5ms/step - loss: 0.001623 Epoch 698/1000 - 0s 4ms/step - loss: 0.001622 Epoch 699/1000 - 0s 5ms/step - loss: 0.001620 Epoch 700/1000 - 0s 5ms/step - loss: 0.001619 Epoch 701/1000 - 0s 5ms/step - loss: 0.001617 Epoch 702/1000 - 0s 5ms/step - loss: 0.001616 Epoch 703/1000 - 0s 5ms/step - loss: 0.001615 Epoch 704/1000 - 0s 5ms/step - loss: 0.001613 Epoch 705/1000 - 0s 5ms/step - loss: 0.001612 Epoch 706/1000 - 0s 5ms/step - loss: 0.001610 Epoch 707/1000 - 0s 5ms/step - loss: 0.001609 Epoch 708/1000 - 0s 5ms/step - loss: 0.001607 Epoch 709/1000 - 0s 5ms/step - loss: 0.001606 Epoch 710/1000 - 0s 5ms/step - loss: 0.001605 Epoch 711/1000 - 0s 5ms/step - loss: 0.001603 Epoch 712/1000 - 0s 5ms/step - loss: 0.001602 Epoch 713/1000 - 0s 5ms/step - loss: 0.001601 Epoch 714/1000 - 0s 5ms/step - loss: 0.001599 Epoch 715/1000 - 0s 5ms/step - loss: 0.001598 Epoch 716/1000 - 0s 4ms/step - loss: 0.001596 Epoch 717/1000 - 0s 5ms/step - loss: 0.001595 Epoch 718/1000 - 0s 4ms/step - loss: 0.001594 Epoch 719/1000 - 0s 4ms/step - loss: 0.001592 Epoch 720/1000 - 0s 4ms/step - loss: 0.001591 Epoch 721/1000 - 0s 4ms/step - loss: 0.001590 Epoch 722/1000 - 0s 4ms/step - loss: 0.001588 Epoch 723/1000 - 0s 4ms/step - loss: 0.001587 Epoch 724/1000 - 0s 4ms/step - loss: 0.001586 Epoch 725/1000 - 0s 4ms/step - loss: 0.001584 Epoch 726/1000 - 0s 5ms/step - loss: 0.001583 Epoch 727/1000 - 0s 6ms/step - loss: 0.001582 Epoch 728/1000 - 0s 6ms/step - loss: 0.001580 Epoch 729/1000 - 0s 6ms/step - loss: 0.001579 Epoch 730/1000 - 0s 5ms/step - loss: 0.001578 Epoch 731/1000 - 0s 5ms/step - loss: 0.001576 Epoch 732/1000 - 0s 5ms/step - loss: 0.001575 Epoch 733/1000 - 0s 5ms/step - loss: 0.001574 Epoch 734/1000 - 0s 5ms/step - loss: 0.001573 Epoch 735/1000 - 0s 5ms/step - loss: 0.001571 Epoch 736/1000 - 0s 5ms/step - loss: 0.001570 Epoch 737/1000 - 0s 6ms/step - loss: 0.001569 Epoch 738/1000 - 0s 5ms/step - loss: 0.001567 Epoch 739/1000 - 0s 5ms/step - loss: 0.001566 Epoch 740/1000 - 0s 5ms/step - loss: 0.001565 Epoch 741/1000 - 0s 5ms/step - loss: 0.001564 Epoch 742/1000 - 0s 5ms/step - loss: 0.001562 Epoch 743/1000 - 0s 6ms/step - loss: 0.001561 Epoch 744/1000 - 0s 5ms/step - loss: 0.001560 Epoch 745/1000 - 0s 5ms/step - loss: 0.001559 Epoch 746/1000 - 0s 5ms/step - loss: 0.001557 Epoch 747/1000 - 0s 5ms/step - loss: 0.001556 Epoch 748/1000 - 0s 5ms/step - loss: 0.001555 Epoch 749/1000 - 0s 5ms/step - loss: 0.001554 Epoch 750/1000 - 0s 5ms/step - loss: 0.001552 Epoch 751/1000 - 0s 5ms/step - loss: 0.001551 Epoch 752/1000 - 0s 5ms/step - loss: 0.001550 Epoch 753/1000 - 0s 5ms/step - loss: 0.001549 Epoch 754/1000 - 0s 5ms/step - loss: 0.001547 Epoch 755/1000 - 0s 5ms/step - loss: 0.001546 Epoch 756/1000 - 0s 4ms/step - loss: 0.001545 Epoch 757/1000 - 0s 5ms/step - loss: 0.001544 Epoch 758/1000 - 0s 4ms/step - loss: 0.001543 Epoch 759/1000 - 0s 5ms/step - loss: 0.001541 Epoch 760/1000 - 0s 4ms/step - loss: 0.001540 Epoch 761/1000 - 0s 5ms/step - loss: 0.001539 Epoch 762/1000 - 0s 4ms/step - loss: 0.001538 Epoch 763/1000 - 0s 4ms/step - loss: 0.001537 Epoch 764/1000 - 0s 4ms/step - loss: 0.001535 Epoch 765/1000 - 0s 4ms/step - loss: 0.001534 Epoch 766/1000 - 0s 4ms/step - loss: 0.001533 Epoch 767/1000 - 0s 5ms/step - loss: 0.001532 Epoch 768/1000 - 0s 5ms/step - loss: 0.001531 Epoch 769/1000 - 0s 5ms/step - loss: 0.001530 Epoch 770/1000 - 0s 5ms/step - loss: 0.001528 Epoch 771/1000 - 0s 5ms/step - loss: 0.001527 Epoch 772/1000 - 0s 5ms/step - loss: 0.001526 Epoch 773/1000 - 0s 5ms/step - loss: 0.001525 Epoch 774/1000 - 0s 5ms/step - loss: 0.001524 Epoch 775/1000 - 0s 5ms/step - loss: 0.001523 Epoch 776/1000 - 0s 4ms/step - loss: 0.001521 Epoch 777/1000 - 0s 4ms/step - loss: 0.001520 Epoch 778/1000 - 0s 5ms/step - loss: 0.001519 Epoch 779/1000 - 0s 5ms/step - loss: 0.001518 Epoch 780/1000 - 0s 5ms/step - loss: 0.001517 Epoch 781/1000 - 0s 5ms/step - loss: 0.001516 Epoch 782/1000 - 0s 5ms/step - loss: 0.001515 Epoch 783/1000 - 0s 5ms/step - loss: 0.001514 Epoch 784/1000 - 0s 5ms/step - loss: 0.001512 Epoch 785/1000 - 0s 4ms/step - loss: 0.001511 Epoch 786/1000 - 0s 4ms/step - loss: 0.001510 Epoch 787/1000 - 0s 4ms/step - loss: 0.001509 Epoch 788/1000 - 0s 5ms/step - loss: 0.001508 Epoch 789/1000 - 0s 5ms/step - loss: 0.001507 Epoch 790/1000 - 0s 4ms/step - loss: 0.001506 Epoch 791/1000 - 0s 5ms/step - loss: 0.001505 Epoch 792/1000 - 0s 4ms/step - loss: 0.001503 Epoch 793/1000 - 0s 4ms/step - loss: 0.001502 Epoch 794/1000 - 0s 4ms/step - loss: 0.001501 Epoch 795/1000 - 0s 4ms/step - loss: 0.001500 Epoch 796/1000 - 0s 4ms/step - loss: 0.001499 Epoch 797/1000 - 0s 4ms/step - loss: 0.001498 Epoch 798/1000 - 0s 5ms/step - loss: 0.001497 Epoch 799/1000 - 0s 4ms/step - loss: 0.001496 Epoch 800/1000 - 0s 4ms/step - loss: 0.001495 Epoch 801/1000 - 0s 4ms/step - loss: 0.001494 Epoch 802/1000 - 0s 4ms/step - loss: 0.001493 Epoch 803/1000 - 0s 4ms/step - loss: 0.001492 Epoch 804/1000 - 0s 4ms/step - loss: 0.001490 Epoch 805/1000 - 0s 4ms/step - loss: 0.001489 Epoch 806/1000 - 0s 4ms/step - loss: 0.001488 Epoch 807/1000 - 0s 4ms/step - loss: 0.001487 Epoch 808/1000 - 0s 4ms/step - loss: 0.001486 Epoch 809/1000 - 0s 4ms/step - loss: 0.001485 Epoch 810/1000 - 0s 4ms/step - loss: 0.001484 Epoch 811/1000 - 0s 4ms/step - loss: 0.001483 Epoch 812/1000 - 0s 4ms/step - loss: 0.001482 Epoch 813/1000 - 0s 4ms/step - loss: 0.001481 Epoch 814/1000 - 0s 6ms/step - loss: 0.001480 Epoch 815/1000 - 0s 4ms/step - loss: 0.001479 Epoch 816/1000 - 0s 5ms/step - loss: 0.001478 Epoch 817/1000 - 0s 5ms/step - loss: 0.001477 Epoch 818/1000 - 0s 5ms/step - loss: 0.001476 Epoch 819/1000 - 0s 5ms/step - loss: 0.001475 Epoch 820/1000 - 0s 5ms/step - loss: 0.001474 Epoch 821/1000 - 0s 5ms/step - loss: 0.001473 Epoch 822/1000 - 0s 5ms/step - loss: 0.001472 Epoch 823/1000 - 0s 5ms/step - loss: 0.001471 Epoch 824/1000 - 0s 5ms/step - loss: 0.001470 Epoch 825/1000 - 0s 4ms/step - loss: 0.001469 Epoch 826/1000 - 0s 5ms/step - loss: 0.001468 Epoch 827/1000 - 0s 5ms/step - loss: 0.001466 Epoch 828/1000 - 0s 5ms/step - loss: 0.001465 Epoch 829/1000 - 0s 4ms/step - loss: 0.001464 Epoch 830/1000 - 0s 4ms/step - loss: 0.001463 Epoch 831/1000 - 0s 4ms/step - loss: 0.001462 Epoch 832/1000 - 0s 4ms/step - loss: 0.001461 Epoch 833/1000 - 0s 4ms/step - loss: 0.001460 Epoch 834/1000 - 0s 4ms/step - loss: 0.001459 Epoch 835/1000 - 0s 4ms/step - loss: 0.001458 Epoch 836/1000 - 0s 4ms/step - loss: 0.001457 Epoch 837/1000 - 0s 4ms/step - loss: 0.001456 Epoch 838/1000 - 0s 4ms/step - loss: 0.001455 Epoch 839/1000 - 0s 4ms/step - loss: 0.001454 Epoch 840/1000 - 0s 4ms/step - loss: 0.001453 Epoch 841/1000 - 0s 4ms/step - loss: 0.001452 Epoch 842/1000 - 0s 4ms/step - loss: 0.001451 Epoch 843/1000 - 0s 5ms/step - loss: 0.001451 Epoch 844/1000 - 0s 5ms/step - loss: 0.001450 Epoch 845/1000 - 0s 4ms/step - loss: 0.001449 Epoch 846/1000 - 0s 4ms/step - loss: 0.001448 Epoch 847/1000 - 0s 5ms/step - loss: 0.001447 Epoch 848/1000 - 0s 4ms/step - loss: 0.001446 Epoch 849/1000 - 0s 4ms/step - loss: 0.001445 Epoch 850/1000 - 0s 4ms/step - loss: 0.001444 Epoch 851/1000 - 0s 4ms/step - loss: 0.001443 Epoch 852/1000 - 0s 4ms/step - loss: 0.001442 Epoch 853/1000 - 0s 5ms/step - loss: 0.001441 Epoch 854/1000 - 0s 5ms/step - loss: 0.001440 Epoch 855/1000 - 0s 5ms/step - loss: 0.001439 Epoch 856/1000 - 0s 5ms/step - loss: 0.001438 Epoch 857/1000 - 0s 5ms/step - loss: 0.001437 Epoch 858/1000 - 0s 5ms/step - loss: 0.001436 Epoch 859/1000 - 0s 5ms/step - loss: 0.001435 Epoch 860/1000 - 0s 6ms/step - loss: 0.001434 Epoch 861/1000 - 0s 5ms/step - loss: 0.001433 Epoch 862/1000 - 0s 5ms/step - loss: 0.001432 Epoch 863/1000 - 0s 5ms/step - loss: 0.001431 Epoch 864/1000 - 0s 5ms/step - loss: 0.001430 Epoch 865/1000 - 0s 5ms/step - loss: 0.001429 Epoch 866/1000 - 0s 4ms/step - loss: 0.001428 Epoch 867/1000 - 0s 4ms/step - loss: 0.001427 Epoch 868/1000 - 0s 4ms/step - loss: 0.001427 Epoch 869/1000 - 0s 4ms/step - loss: 0.001426 Epoch 870/1000 - 0s 4ms/step - loss: 0.001425 Epoch 871/1000 - 0s 4ms/step - loss: 0.001424 Epoch 872/1000 - 0s 4ms/step - loss: 0.001423 Epoch 873/1000 - 0s 4ms/step - loss: 0.001422 Epoch 874/1000 - 0s 4ms/step - loss: 0.001421 Epoch 875/1000 - 0s 4ms/step - loss: 0.001420 Epoch 876/1000 - 0s 4ms/step - loss: 0.001419 Epoch 877/1000 - 0s 4ms/step - loss: 0.001418 Epoch 878/1000 - 0s 4ms/step - loss: 0.001417 Epoch 879/1000 - 0s 4ms/step - loss: 0.001416 Epoch 880/1000 - 0s 4ms/step - loss: 0.001415 Epoch 881/1000 - 0s 4ms/step - loss: 0.001415 Epoch 882/1000 - 0s 4ms/step - loss: 0.001414 Epoch 883/1000 - 0s 4ms/step - loss: 0.001413 Epoch 884/1000 - 0s 4ms/step - loss: 0.001412 Epoch 885/1000 - 0s 4ms/step - loss: 0.001411 Epoch 886/1000 - 0s 4ms/step - loss: 0.001410 Epoch 887/1000 - 0s 4ms/step - loss: 0.001409 Epoch 888/1000 - 0s 4ms/step - loss: 0.001408 Epoch 889/1000 - 0s 4ms/step - loss: 0.001407 Epoch 890/1000 - 0s 4ms/step - loss: 0.001406 Epoch 891/1000 - 0s 4ms/step - loss: 0.001405 Epoch 892/1000 - 0s 5ms/step - loss: 0.001405 Epoch 893/1000 - 0s 5ms/step - loss: 0.001404 Epoch 894/1000 - 0s 5ms/step - loss: 0.001403 Epoch 895/1000 - 0s 5ms/step - loss: 0.001402 Epoch 896/1000 - 0s 5ms/step - loss: 0.001401 Epoch 897/1000 - 0s 4ms/step - loss: 0.001400 Epoch 898/1000 - 0s 5ms/step - loss: 0.001399 Epoch 899/1000 - 0s 5ms/step - loss: 0.001398 Epoch 900/1000 - 0s 5ms/step - loss: 0.001397 Epoch 901/1000 - 0s 5ms/step - loss: 0.001397 Epoch 902/1000 - 0s 5ms/step - loss: 0.001396 Epoch 903/1000 - 0s 5ms/step - loss: 0.001395 Epoch 904/1000 - 0s 5ms/step - loss: 0.001394 Epoch 905/1000 - 0s 5ms/step - loss: 0.001393 Epoch 906/1000 - 0s 4ms/step - loss: 0.001392 Epoch 907/1000 - 0s 5ms/step - loss: 0.001391 Epoch 908/1000 - 0s 5ms/step - loss: 0.001390 Epoch 909/1000 - 0s 5ms/step - loss: 0.001390 Epoch 910/1000 - 0s 5ms/step - loss: 0.001389 Epoch 911/1000 - 0s 4ms/step - loss: 0.001388 Epoch 912/1000 - 0s 4ms/step - loss: 0.001387 Epoch 913/1000 - 0s 4ms/step - loss: 0.001386 Epoch 914/1000 - 0s 4ms/step - loss: 0.001385 Epoch 915/1000 - 0s 5ms/step - loss: 0.001384 Epoch 916/1000 - 0s 4ms/step - loss: 0.001384 Epoch 917/1000 - 0s 4ms/step - loss: 0.001383 Epoch 918/1000 - 0s 4ms/step - loss: 0.001382 Epoch 919/1000 - 0s 4ms/step - loss: 0.001381 Epoch 920/1000 - 0s 4ms/step - loss: 0.001380 Epoch 921/1000 - 0s 4ms/step - loss: 0.001379 Epoch 922/1000 - 0s 4ms/step - loss: 0.001379 Epoch 923/1000 - 0s 4ms/step - loss: 0.001378 Epoch 924/1000 - 0s 4ms/step - loss: 0.001377 Epoch 925/1000 - 0s 5ms/step - loss: 0.001376 Epoch 926/1000 - 0s 4ms/step - loss: 0.001375 Epoch 927/1000 - 0s 6ms/step - loss: 0.001374 Epoch 928/1000 - 0s 6ms/step - loss: 0.001373 Epoch 929/1000 - 0s 5ms/step - loss: 0.001373 Epoch 930/1000 - 0s 6ms/step - loss: 0.001372 Epoch 931/1000 - 0s 5ms/step - loss: 0.001371 Epoch 932/1000 - 0s 4ms/step - loss: 0.001370 Epoch 933/1000 - 0s 5ms/step - loss: 0.001369 Epoch 934/1000 - 0s 5ms/step - loss: 0.001368 Epoch 935/1000 - 0s 4ms/step - loss: 0.001368 Epoch 936/1000 - 0s 5ms/step - loss: 0.001367 Epoch 937/1000 - 0s 5ms/step - loss: 0.001366 Epoch 938/1000 - 0s 5ms/step - loss: 0.001365 Epoch 939/1000 - 0s 4ms/step - loss: 0.001364 Epoch 940/1000 - 0s 5ms/step - loss: 0.001364 Epoch 941/1000 - 0s 4ms/step - loss: 0.001363 Epoch 942/1000 - 0s 5ms/step - loss: 0.001362 Epoch 943/1000 - 0s 5ms/step - loss: 0.001361 Epoch 944/1000 - 0s 5ms/step - loss: 0.001360 Epoch 945/1000 - 0s 5ms/step - loss: 0.001359 Epoch 946/1000 - 0s 4ms/step - loss: 0.001359 Epoch 947/1000 - 0s 4ms/step - loss: 0.001358 Epoch 948/1000 - 0s 5ms/step - loss: 0.001357 Epoch 949/1000 - 0s 5ms/step - loss: 0.001356 Epoch 950/1000 - 0s 4ms/step - loss: 0.001355 Epoch 951/1000 - 0s 4ms/step - loss: 0.001355 Epoch 952/1000 - 0s 4ms/step - loss: 0.001354 Epoch 953/1000 - 0s 4ms/step - loss: 0.001353 Epoch 954/1000 - 0s 4ms/step - loss: 0.001352 Epoch 955/1000 - 0s 4ms/step - loss: 0.001351 Epoch 956/1000 - 0s 4ms/step - loss: 0.001351 Epoch 957/1000 - 0s 5ms/step - loss: 0.001350 Epoch 958/1000 - 0s 5ms/step - loss: 0.001349 Epoch 959/1000 - 0s 5ms/step - loss: 0.001348 Epoch 960/1000 - 0s 4ms/step - loss: 0.001347 Epoch 961/1000 - 0s 5ms/step - loss: 0.001347 Epoch 962/1000 - 0s 5ms/step - loss: 0.001346 Epoch 963/1000 - 0s 6ms/step - loss: 0.001345 Epoch 964/1000 - 0s 5ms/step - loss: 0.001344 Epoch 965/1000 - 0s 3ms/step - loss: 0.001344 Epoch 966/1000 - 0s 4ms/step - loss: 0.001343 Epoch 967/1000 - 0s 3ms/step - loss: 0.001342 Epoch 968/1000 - 0s 5ms/step - loss: 0.001341 Epoch 969/1000 - 0s 4ms/step - loss: 0.001340 Epoch 970/1000 - 0s 4ms/step - loss: 0.001340 Epoch 971/1000 - 0s 5ms/step - loss: 0.001339 Epoch 972/1000 - 0s 4ms/step - loss: 0.001338 Epoch 973/1000 - 0s 4ms/step - loss: 0.001337 Epoch 974/1000 - 0s 4ms/step - loss: 0.001337 Epoch 975/1000 - 0s 5ms/step - loss: 0.001336 Epoch 976/1000 - 0s 5ms/step - loss: 0.001335 Epoch 977/1000 - 0s 4ms/step - loss: 0.001334 Epoch 978/1000 - 0s 4ms/step - loss: 0.001333 Epoch 979/1000 - 0s 7ms/step - loss: 0.001333 Epoch 980/1000 - 0s 5ms/step - loss: 0.001332 Epoch 981/1000 - 0s 6ms/step - loss: 0.001331 Epoch 982/1000 - 0s 6ms/step - loss: 0.001330 Epoch 983/1000 - 0s 5ms/step - loss: 0.001330 Epoch 984/1000 - 0s 5ms/step - loss: 0.001329 Epoch 985/1000 - 0s 6ms/step - loss: 0.001328 Epoch 986/1000 - 0s 6ms/step - loss: 0.001327 Epoch 987/1000 - 0s 4ms/step - loss: 0.001327 Epoch 988/1000 - 0s 5ms/step - loss: 0.001326 Epoch 989/1000 - 0s 4ms/step - loss: 0.001325 Epoch 990/1000 - 0s 4ms/step - loss: 0.001324 Epoch 991/1000 - 0s 4ms/step - loss: 0.001324 Epoch 992/1000 - 0s 5ms/step - loss: 0.001323 Epoch 993/1000 - 0s 4ms/step - loss: 0.001322 Epoch 994/1000 - 0s 4ms/step - loss: 0.001321 Epoch 995/1000 - 0s 4ms/step - loss: 0.001321 Epoch 996/1000 - 0s 4ms/step - loss: 0.001320 Epoch 997/1000 - 0s 5ms/step - loss: 0.001319 Epoch 998/1000 - 0s 5ms/step - loss: 0.001318 Epoch 999/1000 - 0s 4ms/step - loss: 0.001318 Epoch 1000/1000 - 0s 5ms/step - loss: 0.001317
Plot loss chart¶
In [13]:
epochs = range(1, num_epoch+1)
plt.plot(epochs, losses, "b", label="Training Loss")
plt.xlabel("epochs")
plt.ylabel("loss")
plt.show()
Evaluate model (using test dataset)¶
In [14]:
print("Test result")
y_pred = model(x_test).cpu()
test_loss = criterion(y_pred, y_test).item()
print("Loss :", test_loss)
Test result Loss : 0.0006105975480750203
Predict specific date's price¶
In [15]:
print(f"{dates[test_case_index]}'s {price_select} price(predict) : {scaler.inverse_transform(model(x_test[test_case_index].view([1, 1, -1])).detach().cpu())[0][0]}")
print(f"{dates[test_case_index]}'s {price_select} price(answer) : {scaler.inverse_transform(y_test)[test_case_index][0]}")
2022-12-16's Open price(predict) : 77667.63152182102 2022-12-16's Open price(answer) : 77100.00025779009
Plot price chart (predicted price VS real price)¶
In [16]:
plt.figure(figsize=(40, 10))
plt.plot(dates[-test_size+sequence_length:], scaler.inverse_transform(y_pred.detach().numpy()), label="predicted")
plt.plot(dates[-test_size+sequence_length:], scaler.inverse_transform(y_test), label="target")
plt.xticks(rotation=90)
plt.margins(0.00001)
plt.title("Stock "+price_select+" Price Prediction -- "+stock)
plt.xlabel("Dates")
plt.ylabel(price_select+" Price")
plt.legend()
plt.show()
728x90
반응형
'Graduate School > Neural Network' 카테고리의 다른 글
Face Recognition (0) | 2024.09.10 |
---|---|
Image Prediction (0) | 2024.09.10 |
Linear Classifier 02 (0) | 2024.09.10 |
Linear Classifier 01 (0) | 2024.09.10 |
Contents
소중한 공감 감사합니다