Loading...
墨滴

希仔

2021/04/10  阅读:55  主题:默认主题

文本生成

import tensorflow as tf

from tensorflow.keras.preprocessing.sequence import pad_sequences
from tensorflow.keras.layers import Embedding, LSTM, Dense, Bidirectional
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.models import Sequential
from tensorflow.keras.optimizers import Adam
import numpy as np 
import time
#print(time.time())
tokenizer = Tokenizer()

data="In the town of Athy one Jeremy Lanigan \n Battered away til he hadnt a pound. \nHis father died and made him a man again \n Left him a farm and ten acres of ground. \nHe gave a grand party for friends and relations \nWho didnt forget him when come to the wall, \nAnd if youll but listen Ill make your eyes glisten \nOf the rows and the ructions of Lanigans Ball. \nMyself to be sure got free invitation, \nFor all the nice girls and boys I might ask, \nAnd just in a minute both friends and relations \nWere dancing round merry as bees round a cask. \nJudy ODaly, that nice little milliner, \nShe tipped me a wink for to give her a call, \nAnd I soon arrived with Peggy McGilligan \nJust in time for Lanigans Ball. \nThere were lashings of punch and wine for the ladies, \nPotatoes and cakes; there was bacon and tea, \nThere were the Nolans, Dolans, OGradys \nCourting the girls and dancing away. \nSongs they went round as plenty as water, \nThe harp that once sounded in Taras old hall,\nSweet Nelly Gray and The Rat Catchers Daughter,\nAll singing together at Lanigans Ball. \nThey were doing all kinds of nonsensical polkas \nAll round the room in a whirligig. \nJulia and I, we banished their nonsense \nAnd tipped them the twist of a reel and a jig. \nAch mavrone, how the girls got all mad at me \nDanced til youd think the ceiling would fall. \nFor I spent three weeks at Brooks Academy \nLearning new steps for Lanigans Ball. \nThree long weeks I spent up in Dublin, \nThree long weeks to learn nothing at all,\n Three long weeks I spent up in Dublin, \nLearning new steps for Lanigans Ball. \nShe stepped out and I stepped in again, \nI stepped out and she stepped in again, \nShe stepped out and I stepped in again, \nLearning new steps for Lanigans Ball. \nBoys were all merry and the girls they were hearty \nAnd danced all around in couples and groups, \nTil an accident happened, young Terrance McCarthy \nPut his right leg through miss Finnertys hoops. \nPoor creature fainted and cried Meelia murther, \nCalled for her brothers and gathered them all. \nCarmody swore that hed go no further \nTil he had satisfaction at Lanigans Ball. \nIn the midst of the row miss Kerrigan fainted, \nHer cheeks at the same time as red as a rose. \nSome of the lads declared she was painted, \nShe took a small drop too much, I suppose. \nHer sweetheart, Ned Morgan, so powerful and able, \nWhen he saw his fair colleen stretched out by the wall, \nTore the left leg from under the table \nAnd smashed all the Chaneys at Lanigans Ball. \nBoys, oh boys, twas then there were runctions. \nMyself got a lick from big Phelim McHugh. \nI soon replied to his introduction \nAnd kicked up a terrible hullabaloo. \nOld Casey, the piper, was near being strangled. \nThey squeezed up his pipes, bellows, chanters and all. \nThe girls, in their ribbons, they got all entangled \nAnd that put an end to Lanigans Ball."

corpus = data.lower().split("\n")

tokenizer.fit_on_texts(corpus)
total_words = len(tokenizer.word_index) + 1

print(tokenizer.word_index)
print(total_words)

{'and': 1, 'the': 2, 'a': 3, 'in': 4, 'all': 5, 'i': 6, 'for': 7, 'of': 8, 'lanigans': 9, 'ball': 10, 'were': 11, 'at': 12, 'to': 13, 'she': 14, 'stepped': 15, 'his': 16, 'girls': 17, 'as': 18, 'they': 19, 'til': 20, 'he': 21, 'again': 22, 'got': 23, 'boys': 24, 'round': 25, 'that': 26, 'her': 27, 'there': 28, 'three': 29, 'weeks': 30, 'up': 31, 'out': 32, 'him': 33, 'was': 34, 'spent': 35, 'learning': 36, 'new': 37, 'steps': 38, 'long': 39, 'away': 40, 'left': 41, 'friends': 42, 'relations': 43, 'when': 44, 'wall': 45, 'myself': 46, 'nice': 47, 'just': 48, 'dancing': 49, 'merry': 50, 'tipped': 51, 'me': 52, 'soon': 53, 'time': 54, 'old': 55, 'their': 56, 'them': 57, 'danced': 58, 'dublin': 59, 'an': 60, 'put': 61, 'leg': 62, 'miss': 63, 'fainted': 64, 'from': 65, 'town': 66, 'athy': 67, 'one': 68, 'jeremy': 69, 'lanigan': 70, 'battered': 71, 'hadnt': 72, 'pound': 73, 'father': 74, 'died': 75, 'made': 76, 'man': 77, 'farm': 78, 'ten': 79, 'acres': 80, 'ground': 81, 'gave': 82, 'grand': 83, 'party': 84, 'who': 85, 'didnt': 86, 'forget': 87, 'come': 88, 'if': 89, 'youll': 90, 'but': 91, 'listen': 92, 'ill': 93, 'make': 94, 'your': 95, 'eyes': 96, 'glisten': 97, 'rows': 98, 'ructions': 99, 'be': 100, 'sure': 101, 'free': 102, 'invitation': 103, 'might': 104, 'ask': 105, 'minute': 106, 'both': 107, 'bees': 108, 'cask': 109, 'judy': 110, 'odaly': 111, 'little': 112, 'milliner': 113, 'wink': 114, 'give': 115, 'call': 116, 'arrived': 117, 'with': 118, 'peggy': 119, 'mcgilligan': 120, 'lashings': 121, 'punch': 122, 'wine': 123, 'ladies': 124, 'potatoes': 125, 'cakes': 126, 'bacon': 127, 'tea': 128, 'nolans': 129, 'dolans': 130, 'ogradys': 131, 'courting': 132, 'songs': 133, 'went': 134, 'plenty': 135, 'water': 136, 'harp': 137, 'once': 138, 'sounded': 139, 'taras': 140, 'hall': 141, 'sweet': 142, 'nelly': 143, 'gray': 144, 'rat': 145, 'catchers': 146, 'daughter': 147, 'singing': 148, 'together': 149, 'doing': 150, 'kinds': 151, 'nonsensical': 152, 'polkas': 153, 'room': 154, 'whirligig': 155, 'julia': 156, 'we': 157, 'banished': 158, 'nonsense': 159, 'twist': 160, 'reel': 161, 'jig': 162, 'ach': 163, 'mavrone': 164, 'how': 165, 'mad': 166, 'youd': 167, 'think': 168, 'ceiling': 169, 'would': 170, 'fall': 171, 'brooks': 172, 'academy': 173, 'learn': 174, 'nothing': 175, 'hearty': 176, 'around': 177, 'couples': 178, 'groups': 179, 'accident': 180, 'happened': 181, 'young': 182, 'terrance': 183, 'mccarthy': 184, 'right': 185, 'through': 186, 'finnertys': 187, 'hoops': 188, 'poor': 189, 'creature': 190, 'cried': 191, 'meelia': 192, 'murther': 193, 'called': 194, 'brothers': 195, 'gathered': 196, 'carmody': 197, 'swore': 198, 'hed': 199, 'go': 200, 'no': 201, 'further': 202, 'had': 203, 'satisfaction': 204, 'midst': 205, 'row': 206, 'kerrigan': 207, 'cheeks': 208, 'same': 209, 'red': 210, 'rose': 211, 'some': 212, 'lads': 213, 'declared': 214, 'painted': 215, 'took': 216, 'small': 217, 'drop': 218, 'too': 219, 'much': 220, 'suppose': 221, 'sweetheart': 222, 'ned': 223, 'morgan': 224, 'so': 225, 'powerful': 226, 'able': 227, 'saw': 228, 'fair': 229, 'colleen': 230, 'stretched': 231, 'by': 232, 'tore': 233, 'under': 234, 'table': 235, 'smashed': 236, 'chaneys': 237, 'oh': 238, 'twas': 239, 'then': 240, 'runctions': 241, 'lick': 242, 'big': 243, 'phelim': 244, 'mchugh': 245, 'replied': 246, 'introduction': 247, 'kicked': 248, 'terrible': 249, 'hullabaloo': 250, 'casey': 251, 'piper': 252, 'near': 253, 'being': 254, 'strangled': 255, 'squeezed': 256, 'pipes': 257, 'bellows': 258, 'chanters': 259, 'ribbons': 260, 'entangled': 261, 'end': 262}
263
input_sequences = []
for line in corpus:
 token_list = tokenizer.texts_to_sequences([line])[0]
 for i in range(1, len(token_list)):
  n_gram_sequence = token_list[:i+1]
  input_sequences.append(n_gram_sequence)

# pad sequences 
max_sequence_len = max([len(x) for x in input_sequences])
input_sequences = np.array(pad_sequences(input_sequences, maxlen=max_sequence_len, padding='pre'))

# create predictors and label
xs, labels = input_sequences[:,:-1],input_sequences[:,-1]

ys = tf.keras.utils.to_categorical(labels, num_classes=total_words)
print(tokenizer.word_index['in'])
print(tokenizer.word_index['the'])
print(tokenizer.word_index['town'])
print(tokenizer.word_index['of'])
print(tokenizer.word_index['athy'])
print(tokenizer.word_index['one'])
print(tokenizer.word_index['jeremy'])
print(tokenizer.word_index['lanigan'])
4
2
66
8
67
68
69
70
print(xs[6])
[ 0  0  0  4  2 66  8 67 68 69]
print(ys[6])
[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
print(xs[5])
print(ys[5])
[ 0  0  0  0  4  2 66  8 67 68]
[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
print(tokenizer.word_index)
{'and': 1, 'the': 2, 'a': 3, 'in': 4, 'all': 5, 'i': 6, 'for': 7, 'of': 8, 'lanigans': 9, 'ball': 10, 'were': 11, 'at': 12, 'to': 13, 'she': 14, 'stepped': 15, 'his': 16, 'girls': 17, 'as': 18, 'they': 19, 'til': 20, 'he': 21, 'again': 22, 'got': 23, 'boys': 24, 'round': 25, 'that': 26, 'her': 27, 'there': 28, 'three': 29, 'weeks': 30, 'up': 31, 'out': 32, 'him': 33, 'was': 34, 'spent': 35, 'learning': 36, 'new': 37, 'steps': 38, 'long': 39, 'away': 40, 'left': 41, 'friends': 42, 'relations': 43, 'when': 44, 'wall': 45, 'myself': 46, 'nice': 47, 'just': 48, 'dancing': 49, 'merry': 50, 'tipped': 51, 'me': 52, 'soon': 53, 'time': 54, 'old': 55, 'their': 56, 'them': 57, 'danced': 58, 'dublin': 59, 'an': 60, 'put': 61, 'leg': 62, 'miss': 63, 'fainted': 64, 'from': 65, 'town': 66, 'athy': 67, 'one': 68, 'jeremy': 69, 'lanigan': 70, 'battered': 71, 'hadnt': 72, 'pound': 73, 'father': 74, 'died': 75, 'made': 76, 'man': 77, 'farm': 78, 'ten': 79, 'acres': 80, 'ground': 81, 'gave': 82, 'grand': 83, 'party': 84, 'who': 85, 'didnt': 86, 'forget': 87, 'come': 88, 'if': 89, 'youll': 90, 'but': 91, 'listen': 92, 'ill': 93, 'make': 94, 'your': 95, 'eyes': 96, 'glisten': 97, 'rows': 98, 'ructions': 99, 'be': 100, 'sure': 101, 'free': 102, 'invitation': 103, 'might': 104, 'ask': 105, 'minute': 106, 'both': 107, 'bees': 108, 'cask': 109, 'judy': 110, 'odaly': 111, 'little': 112, 'milliner': 113, 'wink': 114, 'give': 115, 'call': 116, 'arrived': 117, 'with': 118, 'peggy': 119, 'mcgilligan': 120, 'lashings': 121, 'punch': 122, 'wine': 123, 'ladies': 124, 'potatoes': 125, 'cakes': 126, 'bacon': 127, 'tea': 128, 'nolans': 129, 'dolans': 130, 'ogradys': 131, 'courting': 132, 'songs': 133, 'went': 134, 'plenty': 135, 'water': 136, 'harp': 137, 'once': 138, 'sounded': 139, 'taras': 140, 'hall': 141, 'sweet': 142, 'nelly': 143, 'gray': 144, 'rat': 145, 'catchers': 146, 'daughter': 147, 'singing': 148, 'together': 149, 'doing': 150, 'kinds': 151, 'nonsensical': 152, 'polkas': 153, 'room': 154, 'whirligig': 155, 'julia': 156, 'we': 157, 'banished': 158, 'nonsense': 159, 'twist': 160, 'reel': 161, 'jig': 162, 'ach': 163, 'mavrone': 164, 'how': 165, 'mad': 166, 'youd': 167, 'think': 168, 'ceiling': 169, 'would': 170, 'fall': 171, 'brooks': 172, 'academy': 173, 'learn': 174, 'nothing': 175, 'hearty': 176, 'around': 177, 'couples': 178, 'groups': 179, 'accident': 180, 'happened': 181, 'young': 182, 'terrance': 183, 'mccarthy': 184, 'right': 185, 'through': 186, 'finnertys': 187, 'hoops': 188, 'poor': 189, 'creature': 190, 'cried': 191, 'meelia': 192, 'murther': 193, 'called': 194, 'brothers': 195, 'gathered': 196, 'carmody': 197, 'swore': 198, 'hed': 199, 'go': 200, 'no': 201, 'further': 202, 'had': 203, 'satisfaction': 204, 'midst': 205, 'row': 206, 'kerrigan': 207, 'cheeks': 208, 'same': 209, 'red': 210, 'rose': 211, 'some': 212, 'lads': 213, 'declared': 214, 'painted': 215, 'took': 216, 'small': 217, 'drop': 218, 'too': 219, 'much': 220, 'suppose': 221, 'sweetheart': 222, 'ned': 223, 'morgan': 224, 'so': 225, 'powerful': 226, 'able': 227, 'saw': 228, 'fair': 229, 'colleen': 230, 'stretched': 231, 'by': 232, 'tore': 233, 'under': 234, 'table': 235, 'smashed': 236, 'chaneys': 237, 'oh': 238, 'twas': 239, 'then': 240, 'runctions': 241, 'lick': 242, 'big': 243, 'phelim': 244, 'mchugh': 245, 'replied': 246, 'introduction': 247, 'kicked': 248, 'terrible': 249, 'hullabaloo': 250, 'casey': 251, 'piper': 252, 'near': 253, 'being': 254, 'strangled': 255, 'squeezed': 256, 'pipes': 257, 'bellows': 258, 'chanters': 259, 'ribbons': 260, 'entangled': 261, 'end': 262}
  model = Sequential()
  model.add(Embedding(total_words, 64, input_length=max_sequence_len-1))
  model.add(Bidirectional(LSTM(20)))
  model.add(Dense(total_words, activation='softmax'))
  model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])
  history = model.fit(xs, ys, epochs=500, verbose=1)

Epoch 1/500
15/15 [==============================] - 2s 4ms/step - loss: 5.5710 - accuracy: 0.0084
Epoch 2/500
15/15 [==============================] - 0s 3ms/step - loss: 5.5496 - accuracy: 0.0445
Epoch 3/500
15/15 [==============================] - 0s 3ms/step - loss: 5.4993 - accuracy: 0.0592
Epoch 4/500
15/15 [==============================] - 0s 4ms/step - loss: 5.3554 - accuracy: 0.0539
Epoch 5/500
15/15 [==============================] - 0s 4ms/step - loss: 5.1284 - accuracy: 0.0556
Epoch 6/500
15/15 [==============================] - 0s 3ms/step - loss: 5.0599 - accuracy: 0.0481
Epoch 7/500
15/15 [==============================] - 0s 4ms/step - loss: 5.0316 - accuracy: 0.0415
Epoch 8/500
15/15 [==============================] - 0s 4ms/step - loss: 5.0214 - accuracy: 0.0456
Epoch 9/500
15/15 [==============================] - 0s 4ms/step - loss: 4.9342 - accuracy: 0.0741
Epoch 10/500
15/15 [==============================] - 0s 3ms/step - loss: 4.9325 - accuracy: 0.0293
Epoch 11/500
15/15 [==============================] - 0s 3ms/step - loss: 4.8784 - accuracy: 0.0651
Epoch 12/500
15/15 [==============================] - 0s 4ms/step - loss: 4.7447 - accuracy: 0.0599
Epoch 13/500
15/15 [==============================] - 0s 5ms/step - loss: 4.7938 - accuracy: 0.0573
Epoch 14/500
15/15 [==============================] - 0s 5ms/step - loss: 4.7386 - accuracy: 0.0625
Epoch 15/500
15/15 [==============================] - 0s 5ms/step - loss: 4.6872 - accuracy: 0.0616
Epoch 16/500
15/15 [==============================] - 0s 5ms/step - loss: 4.6090 - accuracy: 0.0746
Epoch 17/500
15/15 [==============================] - 0s 4ms/step - loss: 4.5208 - accuracy: 0.0745
Epoch 18/500
15/15 [==============================] - 0s 4ms/step - loss: 4.5834 - accuracy: 0.0590
Epoch 19/500
15/15 [==============================] - 0s 5ms/step - loss: 4.5455 - accuracy: 0.0794
Epoch 20/500
15/15 [==============================] - 0s 5ms/step - loss: 4.4345 - accuracy: 0.0747
Epoch 21/500
15/15 [==============================] - 0s 4ms/step - loss: 4.4678 - accuracy: 0.0837
Epoch 22/500
15/15 [==============================] - 0s 4ms/step - loss: 4.2551 - accuracy: 0.1271
Epoch 23/500
15/15 [==============================] - 0s 4ms/step - loss: 4.2671 - accuracy: 0.1576
Epoch 24/500
15/15 [==============================] - 0s 3ms/step - loss: 4.2484 - accuracy: 0.1473
Epoch 25/500
15/15 [==============================] - 0s 4ms/step - loss: 4.2239 - accuracy: 0.1565
Epoch 26/500
15/15 [==============================] - 0s 4ms/step - loss: 4.1735 - accuracy: 0.1362
Epoch 27/500
15/15 [==============================] - 0s 3ms/step - loss: 4.1109 - accuracy: 0.1372
Epoch 28/500
15/15 [==============================] - 0s 3ms/step - loss: 4.0959 - accuracy: 0.1418
Epoch 29/500
15/15 [==============================] - 0s 3ms/step - loss: 4.0178 - accuracy: 0.1627
Epoch 30/500
15/15 [==============================] - 0s 4ms/step - loss: 3.8997 - accuracy: 0.1930
Epoch 31/500
15/15 [==============================] - 0s 4ms/step - loss: 3.9721 - accuracy: 0.1858
Epoch 32/500
15/15 [==============================] - 0s 3ms/step - loss: 3.9364 - accuracy: 0.1585
Epoch 33/500
15/15 [==============================] - 0s 3ms/step - loss: 3.8506 - accuracy: 0.1637
Epoch 34/500
15/15 [==============================] - 0s 3ms/step - loss: 3.7333 - accuracy: 0.1890
Epoch 35/500
15/15 [==============================] - 0s 3ms/step - loss: 3.8617 - accuracy: 0.1577
Epoch 36/500
15/15 [==============================] - 0s 4ms/step - loss: 3.7349 - accuracy: 0.1960
Epoch 37/500
15/15 [==============================] - 0s 4ms/step - loss: 3.6991 - accuracy: 0.2207
Epoch 38/500
15/15 [==============================] - 0s 4ms/step - loss: 3.7319 - accuracy: 0.1845
Epoch 39/500
15/15 [==============================] - 0s 4ms/step - loss: 3.6642 - accuracy: 0.2263
Epoch 40/500
15/15 [==============================] - 0s 3ms/step - loss: 3.6278 - accuracy: 0.2309
Epoch 41/500
15/15 [==============================] - 0s 3ms/step - loss: 3.5551 - accuracy: 0.2719
Epoch 42/500
15/15 [==============================] - 0s 3ms/step - loss: 3.4950 - accuracy: 0.2753
Epoch 43/500
15/15 [==============================] - 0s 4ms/step - loss: 3.4480 - accuracy: 0.2709
Epoch 44/500
15/15 [==============================] - 0s 4ms/step - loss: 3.3378 - accuracy: 0.3059
Epoch 45/500
15/15 [==============================] - 0s 3ms/step - loss: 3.3174 - accuracy: 0.3202
Epoch 46/500
15/15 [==============================] - 0s 3ms/step - loss: 3.3641 - accuracy: 0.3002
Epoch 47/500
15/15 [==============================] - 0s 3ms/step - loss: 3.3116 - accuracy: 0.3082
Epoch 48/500
15/15 [==============================] - 0s 4ms/step - loss: 3.3249 - accuracy: 0.2997
Epoch 49/500
15/15 [==============================] - 0s 4ms/step - loss: 3.2224 - accuracy: 0.3120
Epoch 50/500
15/15 [==============================] - 0s 4ms/step - loss: 3.1283 - accuracy: 0.3432
Epoch 51/500
15/15 [==============================] - 0s 4ms/step - loss: 3.1438 - accuracy: 0.3216
Epoch 52/500
15/15 [==============================] - 0s 4ms/step - loss: 3.1728 - accuracy: 0.3632
Epoch 53/500
15/15 [==============================] - 0s 4ms/step - loss: 3.0632 - accuracy: 0.3652
Epoch 54/500
15/15 [==============================] - 0s 4ms/step - loss: 3.0369 - accuracy: 0.4009
Epoch 55/500
15/15 [==============================] - 0s 5ms/step - loss: 2.9676 - accuracy: 0.4044
Epoch 56/500
15/15 [==============================] - 0s 5ms/step - loss: 3.0149 - accuracy: 0.3783
Epoch 57/500
15/15 [==============================] - 0s 4ms/step - loss: 2.9563 - accuracy: 0.3957
Epoch 58/500
15/15 [==============================] - 0s 3ms/step - loss: 2.8187 - accuracy: 0.4604
Epoch 59/500
15/15 [==============================] - 0s 3ms/step - loss: 2.8535 - accuracy: 0.4524
Epoch 60/500
15/15 [==============================] - 0s 4ms/step - loss: 2.9097 - accuracy: 0.4002
Epoch 61/500
15/15 [==============================] - 0s 5ms/step - loss: 2.8385 - accuracy: 0.4307
Epoch 62/500
15/15 [==============================] - 0s 5ms/step - loss: 2.7719 - accuracy: 0.4386
Epoch 63/500
15/15 [==============================] - 0s 5ms/step - loss: 2.6690 - accuracy: 0.4980
Epoch 64/500
15/15 [==============================] - 0s 4ms/step - loss: 2.7082 - accuracy: 0.4813
Epoch 65/500
15/15 [==============================] - 0s 4ms/step - loss: 2.6270 - accuracy: 0.4706
Epoch 66/500
15/15 [==============================] - 0s 4ms/step - loss: 2.6641 - accuracy: 0.4717
Epoch 67/500
15/15 [==============================] - 0s 3ms/step - loss: 2.6200 - accuracy: 0.5120
Epoch 68/500
15/15 [==============================] - 0s 3ms/step - loss: 2.5774 - accuracy: 0.5032
Epoch 69/500
15/15 [==============================] - 0s 3ms/step - loss: 2.5124 - accuracy: 0.5328
Epoch 70/500
15/15 [==============================] - 0s 4ms/step - loss: 2.5109 - accuracy: 0.5369
Epoch 71/500
15/15 [==============================] - 0s 4ms/step - loss: 2.4439 - accuracy: 0.5500
Epoch 72/500
15/15 [==============================] - 0s 5ms/step - loss: 2.4753 - accuracy: 0.5267
Epoch 73/500
15/15 [==============================] - 0s 4ms/step - loss: 2.4469 - accuracy: 0.5226
Epoch 74/500
15/15 [==============================] - 0s 3ms/step - loss: 2.3922 - accuracy: 0.5521
Epoch 75/500
15/15 [==============================] - 0s 3ms/step - loss: 2.3209 - accuracy: 0.5795
Epoch 76/500
15/15 [==============================] - 0s 4ms/step - loss: 2.3211 - accuracy: 0.5882
Epoch 77/500
15/15 [==============================] - 0s 4ms/step - loss: 2.3610 - accuracy: 0.5715
Epoch 78/500
15/15 [==============================] - 0s 3ms/step - loss: 2.2117 - accuracy: 0.6217
Epoch 79/500
15/15 [==============================] - 0s 4ms/step - loss: 2.1740 - accuracy: 0.6287
Epoch 80/500
15/15 [==============================] - 0s 4ms/step - loss: 2.2374 - accuracy: 0.6234
Epoch 81/500
15/15 [==============================] - 0s 3ms/step - loss: 2.2163 - accuracy: 0.5971
Epoch 82/500
15/15 [==============================] - 0s 3ms/step - loss: 2.2016 - accuracy: 0.5999
Epoch 83/500
15/15 [==============================] - 0s 3ms/step - loss: 2.0903 - accuracy: 0.6711
Epoch 84/500
15/15 [==============================] - 0s 3ms/step - loss: 2.1459 - accuracy: 0.6206
Epoch 85/500
15/15 [==============================] - 0s 3ms/step - loss: 2.0697 - accuracy: 0.6386
Epoch 86/500
15/15 [==============================] - 0s 3ms/step - loss: 2.0637 - accuracy: 0.6509
Epoch 87/500
15/15 [==============================] - 0s 3ms/step - loss: 2.0176 - accuracy: 0.6813
Epoch 88/500
15/15 [==============================] - 0s 3ms/step - loss: 2.0471 - accuracy: 0.6652
Epoch 89/500
15/15 [==============================] - 0s 3ms/step - loss: 1.9619 - accuracy: 0.6939
Epoch 90/500
15/15 [==============================] - 0s 3ms/step - loss: 2.0120 - accuracy: 0.6795
Epoch 91/500
15/15 [==============================] - 0s 3ms/step - loss: 1.9552 - accuracy: 0.6976
Epoch 92/500
15/15 [==============================] - 0s 3ms/step - loss: 1.9511 - accuracy: 0.6793
Epoch 93/500
15/15 [==============================] - 0s 4ms/step - loss: 1.9022 - accuracy: 0.6793
Epoch 94/500
15/15 [==============================] - 0s 3ms/step - loss: 1.9337 - accuracy: 0.6820
Epoch 95/500
15/15 [==============================] - 0s 4ms/step - loss: 1.9166 - accuracy: 0.6757
Epoch 96/500
15/15 [==============================] - 0s 4ms/step - loss: 1.8901 - accuracy: 0.6947
Epoch 97/500
15/15 [==============================] - 0s 5ms/step - loss: 1.8307 - accuracy: 0.7160
Epoch 98/500
15/15 [==============================] - 0s 6ms/step - loss: 1.7830 - accuracy: 0.7227
Epoch 99/500
15/15 [==============================] - 0s 4ms/step - loss: 1.8300 - accuracy: 0.6998
Epoch 100/500
15/15 [==============================] - 0s 4ms/step - loss: 1.7965 - accuracy: 0.7372
Epoch 101/500
15/15 [==============================] - 0s 3ms/step - loss: 1.7807 - accuracy: 0.6959
Epoch 102/500
15/15 [==============================] - 0s 3ms/step - loss: 1.7696 - accuracy: 0.7035
Epoch 103/500
15/15 [==============================] - 0s 4ms/step - loss: 1.7488 - accuracy: 0.7160
Epoch 104/500
15/15 [==============================] - 0s 3ms/step - loss: 1.7830 - accuracy: 0.7132
Epoch 105/500
15/15 [==============================] - 0s 3ms/step - loss: 1.6856 - accuracy: 0.7236
Epoch 106/500
15/15 [==============================] - 0s 4ms/step - loss: 1.6969 - accuracy: 0.7297
Epoch 107/500
15/15 [==============================] - 0s 4ms/step - loss: 1.6598 - accuracy: 0.7390
Epoch 108/500
15/15 [==============================] - 0s 4ms/step - loss: 1.5935 - accuracy: 0.7646
Epoch 109/500
15/15 [==============================] - 0s 3ms/step - loss: 1.6118 - accuracy: 0.7411
Epoch 110/500
15/15 [==============================] - 0s 3ms/step - loss: 1.5716 - accuracy: 0.7575
Epoch 111/500
15/15 [==============================] - 0s 4ms/step - loss: 1.6156 - accuracy: 0.7496
Epoch 112/500
15/15 [==============================] - 0s 4ms/step - loss: 1.5579 - accuracy: 0.7223
Epoch 113/500
15/15 [==============================] - 0s 3ms/step - loss: 1.4975 - accuracy: 0.7695
Epoch 114/500
15/15 [==============================] - 0s 4ms/step - loss: 1.5094 - accuracy: 0.7543
Epoch 115/500
15/15 [==============================] - 0s 5ms/step - loss: 1.5387 - accuracy: 0.7616
Epoch 116/500
15/15 [==============================] - 0s 5ms/step - loss: 1.5065 - accuracy: 0.7608
Epoch 117/500
15/15 [==============================] - 0s 5ms/step - loss: 1.4488 - accuracy: 0.7810
Epoch 118/500
15/15 [==============================] - 0s 5ms/step - loss: 1.4512 - accuracy: 0.7862
Epoch 119/500
15/15 [==============================] - 0s 4ms/step - loss: 1.4172 - accuracy: 0.7944
Epoch 120/500
15/15 [==============================] - 0s 4ms/step - loss: 1.3780 - accuracy: 0.8011
Epoch 121/500
15/15 [==============================] - 0s 4ms/step - loss: 1.3624 - accuracy: 0.8195
Epoch 122/500
15/15 [==============================] - 0s 3ms/step - loss: 1.3939 - accuracy: 0.8022
Epoch 123/500
15/15 [==============================] - 0s 3ms/step - loss: 1.3896 - accuracy: 0.7829
Epoch 124/500
15/15 [==============================] - 0s 3ms/step - loss: 1.3785 - accuracy: 0.7905
Epoch 125/500
15/15 [==============================] - 0s 4ms/step - loss: 1.3244 - accuracy: 0.8071
Epoch 126/500
15/15 [==============================] - 0s 4ms/step - loss: 1.3104 - accuracy: 0.8095
Epoch 127/500
15/15 [==============================] - 0s 4ms/step - loss: 1.2609 - accuracy: 0.8278
Epoch 128/500
15/15 [==============================] - 0s 3ms/step - loss: 1.3049 - accuracy: 0.8169
Epoch 129/500
15/15 [==============================] - 0s 4ms/step - loss: 1.3382 - accuracy: 0.8041
Epoch 130/500
15/15 [==============================] - 0s 3ms/step - loss: 1.2576 - accuracy: 0.8068
Epoch 131/500
15/15 [==============================] - 0s 3ms/step - loss: 1.2506 - accuracy: 0.8203
Epoch 132/500
15/15 [==============================] - 0s 3ms/step - loss: 1.2347 - accuracy: 0.8269
Epoch 133/500
15/15 [==============================] - 0s 4ms/step - loss: 1.1972 - accuracy: 0.8284
Epoch 134/500
15/15 [==============================] - 0s 4ms/step - loss: 1.1747 - accuracy: 0.8446
Epoch 135/500
15/15 [==============================] - 0s 3ms/step - loss: 1.3433 - accuracy: 0.7910
Epoch 136/500
15/15 [==============================] - 0s 3ms/step - loss: 1.3381 - accuracy: 0.7599
Epoch 137/500
15/15 [==============================] - 0s 4ms/step - loss: 1.3492 - accuracy: 0.7759
Epoch 138/500
15/15 [==============================] - 0s 3ms/step - loss: 1.2487 - accuracy: 0.8093
Epoch 139/500
15/15 [==============================] - 0s 3ms/step - loss: 1.2206 - accuracy: 0.8177
Epoch 140/500
15/15 [==============================] - 0s 4ms/step - loss: 1.1752 - accuracy: 0.8139
Epoch 141/500
15/15 [==============================] - 0s 4ms/step - loss: 1.1828 - accuracy: 0.8372
Epoch 142/500
15/15 [==============================] - 0s 5ms/step - loss: 1.1230 - accuracy: 0.8495
Epoch 143/500
15/15 [==============================] - 0s 6ms/step - loss: 1.1108 - accuracy: 0.8668
Epoch 144/500
15/15 [==============================] - 0s 5ms/step - loss: 1.1365 - accuracy: 0.8448
Epoch 145/500
15/15 [==============================] - 0s 5ms/step - loss: 1.1237 - accuracy: 0.8356
Epoch 146/500
15/15 [==============================] - 0s 5ms/step - loss: 1.0494 - accuracy: 0.8773
Epoch 147/500
15/15 [==============================] - 0s 5ms/step - loss: 1.1008 - accuracy: 0.8579
Epoch 148/500
15/15 [==============================] - 0s 4ms/step - loss: 1.0279 - accuracy: 0.8688
Epoch 149/500
15/15 [==============================] - 0s 4ms/step - loss: 1.0318 - accuracy: 0.8880
Epoch 150/500
15/15 [==============================] - 0s 6ms/step - loss: 1.0600 - accuracy: 0.8418
Epoch 151/500
15/15 [==============================] - 0s 5ms/step - loss: 1.0807 - accuracy: 0.8513
Epoch 152/500
15/15 [==============================] - 0s 4ms/step - loss: 1.0466 - accuracy: 0.8540
Epoch 153/500
15/15 [==============================] - 0s 5ms/step - loss: 1.0505 - accuracy: 0.8505
Epoch 154/500
15/15 [==============================] - 0s 6ms/step - loss: 1.0062 - accuracy: 0.8658
Epoch 155/500
15/15 [==============================] - 0s 4ms/step - loss: 0.9753 - accuracy: 0.8534
Epoch 156/500
15/15 [==============================] - 0s 4ms/step - loss: 0.9914 - accuracy: 0.8644
Epoch 157/500
15/15 [==============================] - 0s 5ms/step - loss: 0.9505 - accuracy: 0.8852
Epoch 158/500
15/15 [==============================] - 0s 4ms/step - loss: 0.9860 - accuracy: 0.8715
Epoch 159/500
15/15 [==============================] - 0s 3ms/step - loss: 0.9523 - accuracy: 0.8859
Epoch 160/500
15/15 [==============================] - 0s 4ms/step - loss: 0.9373 - accuracy: 0.8838
Epoch 161/500
15/15 [==============================] - 0s 4ms/step - loss: 0.9284 - accuracy: 0.8842
Epoch 162/500
15/15 [==============================] - 0s 5ms/step - loss: 0.8946 - accuracy: 0.9029
Epoch 163/500
15/15 [==============================] - 0s 5ms/step - loss: 0.9172 - accuracy: 0.8846
Epoch 164/500
15/15 [==============================] - 0s 6ms/step - loss: 0.9150 - accuracy: 0.8883
Epoch 165/500
15/15 [==============================] - 0s 4ms/step - loss: 0.8937 - accuracy: 0.8667
Epoch 166/500
15/15 [==============================] - 0s 4ms/step - loss: 0.9045 - accuracy: 0.8728
Epoch 167/500
15/15 [==============================] - 0s 4ms/step - loss: 0.9048 - accuracy: 0.8742
Epoch 168/500
15/15 [==============================] - 0s 4ms/step - loss: 0.8408 - accuracy: 0.8938
Epoch 169/500
15/15 [==============================] - 0s 4ms/step - loss: 0.8339 - accuracy: 0.8983
Epoch 170/500
15/15 [==============================] - 0s 5ms/step - loss: 0.8444 - accuracy: 0.8998
Epoch 171/500
15/15 [==============================] - 0s 4ms/step - loss: 0.8250 - accuracy: 0.8845
Epoch 172/500
15/15 [==============================] - 0s 3ms/step - loss: 0.8699 - accuracy: 0.8939
Epoch 173/500
15/15 [==============================] - 0s 5ms/step - loss: 0.8169 - accuracy: 0.8951
Epoch 174/500
15/15 [==============================] - 0s 6ms/step - loss: 0.8391 - accuracy: 0.8876
Epoch 175/500
15/15 [==============================] - 0s 5ms/step - loss: 0.8166 - accuracy: 0.8919
Epoch 176/500
15/15 [==============================] - 0s 4ms/step - loss: 0.8236 - accuracy: 0.8773
Epoch 177/500
15/15 [==============================] - 0s 3ms/step - loss: 0.8280 - accuracy: 0.8817
Epoch 178/500
15/15 [==============================] - 0s 4ms/step - loss: 0.7803 - accuracy: 0.8956
Epoch 179/500
15/15 [==============================] - 0s 4ms/step - loss: 0.7840 - accuracy: 0.8998
Epoch 180/500
15/15 [==============================] - 0s 4ms/step - loss: 0.7786 - accuracy: 0.9002
Epoch 181/500
15/15 [==============================] - 0s 4ms/step - loss: 0.7544 - accuracy: 0.9019
Epoch 182/500
15/15 [==============================] - 0s 4ms/step - loss: 0.7846 - accuracy: 0.9034
Epoch 183/500
15/15 [==============================] - 0s 3ms/step - loss: 0.7176 - accuracy: 0.9002
Epoch 184/500
15/15 [==============================] - 0s 4ms/step - loss: 0.7726 - accuracy: 0.9069
Epoch 185/500
15/15 [==============================] - 0s 5ms/step - loss: 0.8075 - accuracy: 0.8917
Epoch 186/500
15/15 [==============================] - 0s 5ms/step - loss: 0.8004 - accuracy: 0.8789
Epoch 187/500
15/15 [==============================] - 0s 4ms/step - loss: 0.7705 - accuracy: 0.8891
Epoch 188/500
15/15 [==============================] - 0s 4ms/step - loss: 0.7870 - accuracy: 0.9004
Epoch 189/500
15/15 [==============================] - 0s 4ms/step - loss: 0.7675 - accuracy: 0.8758
Epoch 190/500
15/15 [==============================] - 0s 4ms/step - loss: 0.7483 - accuracy: 0.8810
Epoch 191/500
15/15 [==============================] - 0s 5ms/step - loss: 0.7655 - accuracy: 0.8971
Epoch 192/500
15/15 [==============================] - 0s 4ms/step - loss: 0.7415 - accuracy: 0.9137
Epoch 193/500
15/15 [==============================] - 0s 4ms/step - loss: 0.7532 - accuracy: 0.8866
Epoch 194/500
15/15 [==============================] - 0s 4ms/step - loss: 0.6792 - accuracy: 0.9077
Epoch 195/500
15/15 [==============================] - 0s 3ms/step - loss: 0.7161 - accuracy: 0.8858
Epoch 196/500
15/15 [==============================] - 0s 4ms/step - loss: 0.6710 - accuracy: 0.9227
Epoch 197/500
15/15 [==============================] - 0s 5ms/step - loss: 0.6853 - accuracy: 0.9077
Epoch 198/500
15/15 [==============================] - 0s 4ms/step - loss: 0.6138 - accuracy: 0.9204
Epoch 199/500
15/15 [==============================] - 0s 4ms/step - loss: 0.6580 - accuracy: 0.9024
Epoch 200/500
15/15 [==============================] - 0s 4ms/step - loss: 0.6416 - accuracy: 0.9137
Epoch 201/500
15/15 [==============================] - 0s 5ms/step - loss: 0.6216 - accuracy: 0.9066
Epoch 202/500
15/15 [==============================] - 0s 4ms/step - loss: 0.6021 - accuracy: 0.9314
Epoch 203/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5915 - accuracy: 0.9314
Epoch 204/500
15/15 [==============================] - 0s 5ms/step - loss: 0.6156 - accuracy: 0.9144
Epoch 205/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5871 - accuracy: 0.9134
Epoch 206/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5974 - accuracy: 0.9089
Epoch 207/500
15/15 [==============================] - 0s 3ms/step - loss: 0.6093 - accuracy: 0.9052
Epoch 208/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5627 - accuracy: 0.9234
Epoch 209/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5619 - accuracy: 0.9296
Epoch 210/500
15/15 [==============================] - 0s 3ms/step - loss: 0.6037 - accuracy: 0.9084
Epoch 211/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5655 - accuracy: 0.9234
Epoch 212/500
15/15 [==============================] - 0s 5ms/step - loss: 0.6023 - accuracy: 0.8916
Epoch 213/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5734 - accuracy: 0.9136
Epoch 214/500
15/15 [==============================] - 0s 5ms/step - loss: 0.5685 - accuracy: 0.9151
Epoch 215/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5422 - accuracy: 0.9221
Epoch 216/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5531 - accuracy: 0.9186
Epoch 217/500
15/15 [==============================] - 0s 5ms/step - loss: 0.5500 - accuracy: 0.9236
Epoch 218/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5751 - accuracy: 0.9017
Epoch 219/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5505 - accuracy: 0.9135
Epoch 220/500
15/15 [==============================] - 0s 5ms/step - loss: 0.5029 - accuracy: 0.9340
Epoch 221/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5395 - accuracy: 0.9239
Epoch 222/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5508 - accuracy: 0.9198
Epoch 223/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5258 - accuracy: 0.9235
Epoch 224/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5014 - accuracy: 0.9418
Epoch 225/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4882 - accuracy: 0.9383
Epoch 226/500
15/15 [==============================] - 0s 5ms/step - loss: 0.5054 - accuracy: 0.9297
Epoch 227/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5073 - accuracy: 0.9231
Epoch 228/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4936 - accuracy: 0.9236
Epoch 229/500
15/15 [==============================] - 0s 4ms/step - loss: 0.5052 - accuracy: 0.9193
Epoch 230/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4988 - accuracy: 0.9140
Epoch 231/500
15/15 [==============================] - 0s 5ms/step - loss: 0.4786 - accuracy: 0.9268
Epoch 232/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4570 - accuracy: 0.9367
Epoch 233/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4638 - accuracy: 0.9306
Epoch 234/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4384 - accuracy: 0.9380
Epoch 235/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4773 - accuracy: 0.9386
Epoch 236/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4447 - accuracy: 0.9402
Epoch 237/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4483 - accuracy: 0.9393
Epoch 238/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4622 - accuracy: 0.9213
Epoch 239/500
15/15 [==============================] - 0s 5ms/step - loss: 0.4746 - accuracy: 0.9303
Epoch 240/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4396 - accuracy: 0.9394
Epoch 241/500
15/15 [==============================] - 0s 5ms/step - loss: 0.4539 - accuracy: 0.9237
Epoch 242/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4550 - accuracy: 0.9393
Epoch 243/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4314 - accuracy: 0.9461
Epoch 244/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4394 - accuracy: 0.9342
Epoch 245/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4381 - accuracy: 0.9441
Epoch 246/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4374 - accuracy: 0.9359
Epoch 247/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4008 - accuracy: 0.9403
Epoch 248/500
15/15 [==============================] - 0s 5ms/step - loss: 0.4101 - accuracy: 0.9397
Epoch 249/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4049 - accuracy: 0.9376
Epoch 250/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4191 - accuracy: 0.9392
Epoch 251/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4205 - accuracy: 0.9401
Epoch 252/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4158 - accuracy: 0.9422
Epoch 253/500
15/15 [==============================] - 0s 5ms/step - loss: 0.4001 - accuracy: 0.9400
Epoch 254/500
15/15 [==============================] - 0s 4ms/step - loss: 0.3933 - accuracy: 0.9421
Epoch 255/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4079 - accuracy: 0.9341
Epoch 256/500
15/15 [==============================] - 0s 5ms/step - loss: 0.3896 - accuracy: 0.9362
Epoch 257/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4311 - accuracy: 0.9291
Epoch 258/500
15/15 [==============================] - 0s 3ms/step - loss: 0.3742 - accuracy: 0.9493
Epoch 259/500
15/15 [==============================] - 0s 4ms/step - loss: 0.3634 - accuracy: 0.9557
Epoch 260/500
15/15 [==============================] - 0s 4ms/step - loss: 0.3705 - accuracy: 0.9454
Epoch 261/500
15/15 [==============================] - 0s 4ms/step - loss: 0.3776 - accuracy: 0.9432
Epoch 262/500
15/15 [==============================] - 0s 5ms/step - loss: 0.3747 - accuracy: 0.9469
Epoch 263/500
15/15 [==============================] - 0s 4ms/step - loss: 0.3638 - accuracy: 0.9367
Epoch 264/500
15/15 [==============================] - 0s 4ms/step - loss: 0.3801 - accuracy: 0.9443
Epoch 265/500
15/15 [==============================] - 0s 4ms/step - loss: 0.3766 - accuracy: 0.9419
Epoch 266/500
15/15 [==============================] - 0s 4ms/step - loss: 0.3869 - accuracy: 0.9323
Epoch 267/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4183 - accuracy: 0.9168
Epoch 268/500
15/15 [==============================] - 0s 5ms/step - loss: 0.4106 - accuracy: 0.9232
Epoch 269/500
15/15 [==============================] - 0s 5ms/step - loss: 0.4048 - accuracy: 0.9294
Epoch 270/500
15/15 [==============================] - 0s 4ms/step - loss: 0.3597 - accuracy: 0.9463
Epoch 271/500
15/15 [==============================] - 0s 5ms/step - loss: 0.3914 - accuracy: 0.9271
Epoch 272/500
15/15 [==============================] - 0s 4ms/step - loss: 0.3672 - accuracy: 0.9363
Epoch 273/500
15/15 [==============================] - 0s 5ms/step - loss: 0.4706 - accuracy: 0.8986
Epoch 274/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4263 - accuracy: 0.9123
Epoch 275/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4384 - accuracy: 0.9154
Epoch 276/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4604 - accuracy: 0.8978
Epoch 277/500
15/15 [==============================] - 0s 4ms/step - loss: 0.4105 - accuracy: 0.9299
Epoch 278/500
15/15 [==============================] - 0s 5ms/step - loss: 0.4030 - accuracy: 0.9292
Epoch 279/500
15/15 [==============================] - 0s 5ms/step - loss: 0.3982 - accuracy: 0.9365
Epoch 280/500
15/15 [==============================] - 0s 5ms/step - loss: 0.3638 - accuracy: 0.9403
Epoch 281/500
15/15 [==============================] - 0s 4ms/step - loss: 0.3603 - accuracy: 0.9441
Epoch 282/500
15/15 [==============================] - 0s 5ms/step - loss: 0.3530 - accuracy: 0.9330
Epoch 283/500
15/15 [==============================] - 0s 4ms/step - loss: 0.3347 - accuracy: 0.9486
Epoch 284/500
15/15 [==============================] - 0s 5ms/step - loss: 0.3352 - accuracy: 0.9498
Epoch 285/500
15/15 [==============================] - 0s 6ms/step - loss: 0.3473 - accuracy: 0.9447
Epoch 286/500
15/15 [==============================] - 0s 6ms/step - loss: 0.3467 - accuracy: 0.9460
Epoch 287/500
15/15 [==============================] - 0s 5ms/step - loss: 0.3063 - accuracy: 0.9594
Epoch 288/500
15/15 [==============================] - 0s 7ms/step - loss: 0.3405 - accuracy: 0.9393
Epoch 289/500
15/15 [==============================] - 0s 6ms/step - loss: 0.3336 - accuracy: 0.9386
Epoch 290/500
15/15 [==============================] - 0s 6ms/step - loss: 0.3018 - accuracy: 0.9578
Epoch 291/500
15/15 [==============================] - 0s 5ms/step - loss: 0.3113 - accuracy: 0.9505
Epoch 292/500
15/15 [==============================] - 0s 6ms/step - loss: 0.3236 - accuracy: 0.9460
Epoch 293/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2994 - accuracy: 0.9512
Epoch 294/500
15/15 [==============================] - 0s 5ms/step - loss: 0.2964 - accuracy: 0.9480
Epoch 295/500
15/15 [==============================] - 0s 5ms/step - loss: 0.3050 - accuracy: 0.9572
Epoch 296/500
15/15 [==============================] - 0s 5ms/step - loss: 0.2772 - accuracy: 0.9539
Epoch 297/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2967 - accuracy: 0.9594
Epoch 298/500
15/15 [==============================] - 0s 5ms/step - loss: 0.3021 - accuracy: 0.9423
Epoch 299/500
15/15 [==============================] - 0s 5ms/step - loss: 0.2960 - accuracy: 0.9451
Epoch 300/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2878 - accuracy: 0.9463
Epoch 301/500
15/15 [==============================] - 0s 5ms/step - loss: 0.2919 - accuracy: 0.9341
Epoch 302/500
15/15 [==============================] - 0s 5ms/step - loss: 0.2876 - accuracy: 0.9401
Epoch 303/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2745 - accuracy: 0.9564
Epoch 304/500
15/15 [==============================] - 0s 5ms/step - loss: 0.2891 - accuracy: 0.9509
Epoch 305/500
15/15 [==============================] - 0s 5ms/step - loss: 0.2510 - accuracy: 0.9660
Epoch 306/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2461 - accuracy: 0.9674
Epoch 307/500
15/15 [==============================] - 0s 8ms/step - loss: 0.2712 - accuracy: 0.9447
Epoch 308/500
15/15 [==============================] - 0s 8ms/step - loss: 0.2719 - accuracy: 0.9528
Epoch 309/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2921 - accuracy: 0.9418
Epoch 310/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2735 - accuracy: 0.9500
Epoch 311/500
15/15 [==============================] - 0s 8ms/step - loss: 0.2464 - accuracy: 0.9600
Epoch 312/500
15/15 [==============================] - 0s 8ms/step - loss: 0.2634 - accuracy: 0.9500
Epoch 313/500
15/15 [==============================] - 0s 5ms/step - loss: 0.2842 - accuracy: 0.9413
Epoch 314/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2739 - accuracy: 0.9414
Epoch 315/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2635 - accuracy: 0.9524
Epoch 316/500
15/15 [==============================] - 0s 8ms/step - loss: 0.2494 - accuracy: 0.9561
Epoch 317/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2782 - accuracy: 0.9259
Epoch 318/500
15/15 [==============================] - 0s 8ms/step - loss: 0.2582 - accuracy: 0.9529
Epoch 319/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2510 - accuracy: 0.9498
Epoch 320/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2704 - accuracy: 0.9461
Epoch 321/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2468 - accuracy: 0.9513
Epoch 322/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2442 - accuracy: 0.9449
Epoch 323/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2676 - accuracy: 0.9275
Epoch 324/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2631 - accuracy: 0.9401
Epoch 325/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2682 - accuracy: 0.9430
Epoch 326/500
15/15 [==============================] - 0s 8ms/step - loss: 0.2327 - accuracy: 0.9440
Epoch 327/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2551 - accuracy: 0.9396
Epoch 328/500
15/15 [==============================] - 0s 8ms/step - loss: 0.2590 - accuracy: 0.9518
Epoch 329/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2714 - accuracy: 0.9269
Epoch 330/500
15/15 [==============================] - 0s 9ms/step - loss: 0.2492 - accuracy: 0.9447
Epoch 331/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2229 - accuracy: 0.9588
Epoch 332/500
15/15 [==============================] - 0s 5ms/step - loss: 0.2433 - accuracy: 0.9457
Epoch 333/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2327 - accuracy: 0.9609
Epoch 334/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2543 - accuracy: 0.9369
Epoch 335/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2329 - accuracy: 0.9487
Epoch 336/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2171 - accuracy: 0.9519
Epoch 337/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2171 - accuracy: 0.9562
Epoch 338/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2398 - accuracy: 0.9469
Epoch 339/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2413 - accuracy: 0.9419
Epoch 340/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2221 - accuracy: 0.9444
Epoch 341/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2332 - accuracy: 0.9396
Epoch 342/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2284 - accuracy: 0.9514
Epoch 343/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2321 - accuracy: 0.9475
Epoch 344/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2209 - accuracy: 0.9446
Epoch 345/500
15/15 [==============================] - 0s 8ms/step - loss: 0.2328 - accuracy: 0.9400
Epoch 346/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2053 - accuracy: 0.9619
Epoch 347/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2120 - accuracy: 0.9602
Epoch 348/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1868 - accuracy: 0.9596
Epoch 349/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2117 - accuracy: 0.9506
Epoch 350/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2266 - accuracy: 0.9521
Epoch 351/500
15/15 [==============================] - 0s 7ms/step - loss: 0.3033 - accuracy: 0.9275
Epoch 352/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2480 - accuracy: 0.9449
Epoch 353/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2565 - accuracy: 0.9291
Epoch 354/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2216 - accuracy: 0.9495
Epoch 355/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2528 - accuracy: 0.9306
Epoch 356/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2264 - accuracy: 0.9437
Epoch 357/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2186 - accuracy: 0.9580
Epoch 358/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2236 - accuracy: 0.9411
Epoch 359/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1938 - accuracy: 0.9572
Epoch 360/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2017 - accuracy: 0.9611
Epoch 361/500
15/15 [==============================] - 0s 8ms/step - loss: 0.2185 - accuracy: 0.9425
Epoch 362/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2128 - accuracy: 0.9579
Epoch 363/500
15/15 [==============================] - 0s 5ms/step - loss: 0.1859 - accuracy: 0.9621
Epoch 364/500
15/15 [==============================] - 0s 5ms/step - loss: 0.2192 - accuracy: 0.9460
Epoch 365/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2056 - accuracy: 0.9434
Epoch 366/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2193 - accuracy: 0.9487
Epoch 367/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1866 - accuracy: 0.9551
Epoch 368/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1896 - accuracy: 0.9519
Epoch 369/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2087 - accuracy: 0.9479
Epoch 370/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2083 - accuracy: 0.9545
Epoch 371/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1998 - accuracy: 0.9538
Epoch 372/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2027 - accuracy: 0.9468
Epoch 373/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2062 - accuracy: 0.9418
Epoch 374/500
15/15 [==============================] - 0s 5ms/step - loss: 0.2066 - accuracy: 0.9492
Epoch 375/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2072 - accuracy: 0.9394
Epoch 376/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1980 - accuracy: 0.9499
Epoch 377/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1933 - accuracy: 0.9629
Epoch 378/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2000 - accuracy: 0.9498
Epoch 379/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1939 - accuracy: 0.9489
Epoch 380/500
15/15 [==============================] - 0s 5ms/step - loss: 0.1936 - accuracy: 0.9474
Epoch 381/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1818 - accuracy: 0.9665
Epoch 382/500
15/15 [==============================] - 0s 8ms/step - loss: 0.1900 - accuracy: 0.9565
Epoch 383/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1966 - accuracy: 0.9556
Epoch 384/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2054 - accuracy: 0.9454
Epoch 385/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1768 - accuracy: 0.9558
Epoch 386/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1854 - accuracy: 0.9525
Epoch 387/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1697 - accuracy: 0.9642
Epoch 388/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2029 - accuracy: 0.9399
Epoch 389/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1936 - accuracy: 0.9524
Epoch 390/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1804 - accuracy: 0.9493
Epoch 391/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1629 - accuracy: 0.9591
Epoch 392/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1709 - accuracy: 0.9545
Epoch 393/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1719 - accuracy: 0.9540
Epoch 394/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1721 - accuracy: 0.9539
Epoch 395/500
15/15 [==============================] - 0s 8ms/step - loss: 0.1732 - accuracy: 0.9604
Epoch 396/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1779 - accuracy: 0.9478
Epoch 397/500
15/15 [==============================] - 0s 8ms/step - loss: 0.1728 - accuracy: 0.9463
Epoch 398/500
15/15 [==============================] - 0s 8ms/step - loss: 0.1822 - accuracy: 0.9479
Epoch 399/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1893 - accuracy: 0.9479
Epoch 400/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1978 - accuracy: 0.9413
Epoch 401/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1509 - accuracy: 0.9607
Epoch 402/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1563 - accuracy: 0.9560
Epoch 403/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1611 - accuracy: 0.9585
Epoch 404/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1769 - accuracy: 0.9494
Epoch 405/500
15/15 [==============================] - 0s 5ms/step - loss: 0.1857 - accuracy: 0.9404
Epoch 406/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1903 - accuracy: 0.9512
Epoch 407/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1952 - accuracy: 0.9474
Epoch 408/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1703 - accuracy: 0.9599
Epoch 409/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1783 - accuracy: 0.9415
Epoch 410/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2055 - accuracy: 0.9371
Epoch 411/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2246 - accuracy: 0.9158
Epoch 412/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1714 - accuracy: 0.9481
Epoch 413/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1681 - accuracy: 0.9506
Epoch 414/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1678 - accuracy: 0.9396
Epoch 415/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1656 - accuracy: 0.9582
Epoch 416/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1914 - accuracy: 0.9372
Epoch 417/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1487 - accuracy: 0.9628
Epoch 418/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1733 - accuracy: 0.9441
Epoch 419/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1731 - accuracy: 0.9396
Epoch 420/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1853 - accuracy: 0.9428
Epoch 421/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1583 - accuracy: 0.9573
Epoch 422/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1551 - accuracy: 0.9536
Epoch 423/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1856 - accuracy: 0.9398
Epoch 424/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1780 - accuracy: 0.9568
Epoch 425/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1734 - accuracy: 0.9330
Epoch 426/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1521 - accuracy: 0.9603
Epoch 427/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1523 - accuracy: 0.9542
Epoch 428/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1570 - accuracy: 0.9356
Epoch 429/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1543 - accuracy: 0.9562
Epoch 430/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1680 - accuracy: 0.9395
Epoch 431/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1517 - accuracy: 0.9585
Epoch 432/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1354 - accuracy: 0.9603
Epoch 433/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1624 - accuracy: 0.9473
Epoch 434/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1411 - accuracy: 0.9626
Epoch 435/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1787 - accuracy: 0.9422
Epoch 436/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1730 - accuracy: 0.9497
Epoch 437/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1799 - accuracy: 0.9413
Epoch 438/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2614 - accuracy: 0.9302
Epoch 439/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2586 - accuracy: 0.9332
Epoch 440/500
15/15 [==============================] - 0s 7ms/step - loss: 0.2342 - accuracy: 0.9251
Epoch 441/500
15/15 [==============================] - 0s 5ms/step - loss: 0.2943 - accuracy: 0.9216
Epoch 442/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2907 - accuracy: 0.9102
Epoch 443/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2285 - accuracy: 0.9434
Epoch 444/500
15/15 [==============================] - 0s 6ms/step - loss: 0.2166 - accuracy: 0.9457
Epoch 445/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1688 - accuracy: 0.9585
Epoch 446/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1805 - accuracy: 0.9523
Epoch 447/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1714 - accuracy: 0.9489
Epoch 448/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1587 - accuracy: 0.9552
Epoch 449/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1791 - accuracy: 0.9447
Epoch 450/500
15/15 [==============================] - 0s 5ms/step - loss: 0.1813 - accuracy: 0.9387
Epoch 451/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1804 - accuracy: 0.9411
Epoch 452/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1582 - accuracy: 0.9528
Epoch 453/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1714 - accuracy: 0.9370
Epoch 454/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1458 - accuracy: 0.9515
Epoch 455/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1650 - accuracy: 0.9382
Epoch 456/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1594 - accuracy: 0.9489
Epoch 457/500
15/15 [==============================] - 0s 8ms/step - loss: 0.1416 - accuracy: 0.9382
Epoch 458/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1499 - accuracy: 0.9532
Epoch 459/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1414 - accuracy: 0.9573
Epoch 460/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1342 - accuracy: 0.9433
Epoch 461/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1504 - accuracy: 0.9591
Epoch 462/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1353 - accuracy: 0.9549
Epoch 463/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1597 - accuracy: 0.9380
Epoch 464/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1362 - accuracy: 0.9603
Epoch 465/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1435 - accuracy: 0.9586
Epoch 466/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1612 - accuracy: 0.9516
Epoch 467/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1469 - accuracy: 0.9445
Epoch 468/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1358 - accuracy: 0.9592
Epoch 469/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1451 - accuracy: 0.9590
Epoch 470/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1363 - accuracy: 0.9591
Epoch 471/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1275 - accuracy: 0.9598
Epoch 472/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1694 - accuracy: 0.9362
Epoch 473/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1403 - accuracy: 0.9577
Epoch 474/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1272 - accuracy: 0.9648
Epoch 475/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1282 - accuracy: 0.9612
Epoch 476/500
15/15 [==============================] - 0s 8ms/step - loss: 0.1351 - accuracy: 0.9518
Epoch 477/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1368 - accuracy: 0.9567
Epoch 478/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1379 - accuracy: 0.9493
Epoch 479/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1391 - accuracy: 0.9446
Epoch 480/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1250 - accuracy: 0.9527
Epoch 481/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1482 - accuracy: 0.9520
Epoch 482/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1231 - accuracy: 0.9564
Epoch 483/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1412 - accuracy: 0.9562
Epoch 484/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1402 - accuracy: 0.9551
Epoch 485/500
15/15 [==============================] - 0s 5ms/step - loss: 0.1530 - accuracy: 0.9502
Epoch 486/500
15/15 [==============================] - 0s 5ms/step - loss: 0.1293 - accuracy: 0.9605
Epoch 487/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1321 - accuracy: 0.9496
Epoch 488/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1131 - accuracy: 0.9651
Epoch 489/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1395 - accuracy: 0.9521
Epoch 490/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1578 - accuracy: 0.9395
Epoch 491/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1571 - accuracy: 0.9390
Epoch 492/500
15/15 [==============================] - 0s 5ms/step - loss: 0.1532 - accuracy: 0.9350
Epoch 493/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1293 - accuracy: 0.9549
Epoch 494/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1136 - accuracy: 0.9594
Epoch 495/500
15/15 [==============================] - 0s 8ms/step - loss: 0.1407 - accuracy: 0.9524
Epoch 496/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1217 - accuracy: 0.9534
Epoch 497/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1311 - accuracy: 0.9433
Epoch 498/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1199 - accuracy: 0.9614
Epoch 499/500
15/15 [==============================] - 0s 6ms/step - loss: 0.1341 - accuracy: 0.9598
Epoch 500/500
15/15 [==============================] - 0s 7ms/step - loss: 0.1283 - accuracy: 0.9575
import matplotlib.pyplot as plt


def plot_graphs(history, string):
  plt.plot(history.history[string])
  plt.xlabel("Epochs")
  plt.ylabel(string)
  plt.show()
plot_graphs(history, 'accuracy')


png

seed_text = "Laurence went to dublin"
next_words = 100
  
for _ in range(next_words):
 token_list = tokenizer.texts_to_sequences([seed_text])[0]
 token_list = pad_sequences([token_list], maxlen=max_sequence_len-1, padding='pre')
 predicted = model.predict_classes(token_list, verbose=0)
 output_word = ""
 for word, index in tokenizer.word_index.items():
  if index == predicted:
   output_word = word
   break
 seed_text += " " + output_word
print(seed_text) 
#print(time.time())

/home/yunshu/anaconda3/lib/python3.8/site-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`,   if your model does multi-class classification   (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`,   if your model does binary classification   (e.g. if it uses a `sigmoid` last-layer activation).
  warnings.warn('`model.predict_classes()` is deprecated and '


Laurence went to dublin round a reel and a whirligig whirligig relations might ask eyes glisten ask glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten eyes glisten

希仔

2021/04/10  阅读:55  主题:默认主题

作者介绍

希仔