다운로드
작성자: admin 작성일시: 2018-04-18 21:57:09 조회수: 527 다운로드: 57
카테고리: 머신 러닝 태그목록:

CBOW in Keras

In:
import numpy as np

import keras.backend as K
from keras.models import Sequential
from keras.layers import *
from keras.utils import np_utils
from keras.utils.vis_utils import model_to_dot
from keras.preprocessing import sequence
from keras.preprocessing.text import Tokenizer

import gensim
import nltk

from IPython.display import SVG
In:
nltk.download('gutenberg')
nltk.download('punkt')
In:
sentents = [" ".join(s) for s in nltk.corpus.gutenberg.sents("carroll-alice.txt") if len(s) > 2]
In:
sentents[10]
Out:
'The rabbit - hole went straight on like a tunnel for some way , and then dipped suddenly down , so suddenly that Alice had not a moment to think about stopping herself before she found herself falling down a very deep well .'
In:
tokenizer = Tokenizer()
tokenizer.fit_on_texts(sentents)
corpus = tokenizer.texts_to_sequences(sentents)
nb_samples = sum(len(s) for s in corpus)
V = len(tokenizer.word_index) + 1
dim = 100
window_size = 2
In:
def generate_data(corpus, window_size, V):
    maxlen = window_size*2
    for words in corpus:
        L = len(words)
        for index, word in enumerate(words):
            contexts = []
            labels = []
            s = index - window_size
            e = index + window_size + 1

            contexts.append([words[i] for i in range(s, e) if 0 <= i < L and i != index])
            labels.append(word)

            x = sequence.pad_sequences(contexts, maxlen=maxlen)
            y = np_utils.to_categorical(labels, V)
            yield (x, y)
In:
X = []
Y = []
for x, y in generate_data(corpus, window_size, V):
    X.append(x)
    Y.append(y)

X = np.concatenate(X)
Y = np.concatenate(Y)
In:
X.shape, Y.shape
Out:
((30179, 4), (30179, 2572))
In:
X[2], np.nonzero(Y[2])
Out:
(array([ 12,   1, 475,  13], dtype=int32), (array([20]),))
In:
X[3], np.nonzero(Y[3])
Out:
(array([  1,  20,  13, 831], dtype=int32), (array([475]),))

Model

In:
cbow = Sequential()
cbow.add(Embedding(input_dim=V, output_dim=dim, input_length=window_size*2))
cbow.add(Lambda(lambda x: K.mean(x, axis=1), output_shape=(dim,)))
cbow.add(Dense(V, activation='softmax'))
cbow.compile(loss='categorical_crossentropy', optimizer='adadelta', metrics=["accuracy"])
In:
%%time
hist = cbow.fit(X, Y, epochs=1000, batch_size=300, verbose=2)
Epoch 1/1000
 - 1s - loss: 7.7870 - acc: 0.0780
Epoch 2/1000
 - 1s - loss: 7.3832 - acc: 0.0957
Epoch 3/1000
 - 1s - loss: 6.9438 - acc: 0.0971
Epoch 4/1000
 - 1s - loss: 6.6046 - acc: 0.1013
Epoch 5/1000
 - 1s - loss: 6.3674 - acc: 0.1071
Epoch 6/1000
 - 1s - loss: 6.1999 - acc: 0.1124
Epoch 7/1000
 - 1s - loss: 6.0769 - acc: 0.1215
Epoch 8/1000
 - 1s - loss: 5.9818 - acc: 0.1305
Epoch 9/1000
 - 1s - loss: 5.9034 - acc: 0.1367
Epoch 10/1000
 - 1s - loss: 5.8360 - acc: 0.1401
Epoch 11/1000
 - 1s - loss: 5.7773 - acc: 0.1433
Epoch 12/1000
 - 1s - loss: 5.7257 - acc: 0.1452
Epoch 13/1000
 - 1s - loss: 5.6791 - acc: 0.1472
Epoch 14/1000
 - 1s - loss: 5.6366 - acc: 0.1484
Epoch 15/1000
 - 1s - loss: 5.5972 - acc: 0.1501
Epoch 16/1000
 - 1s - loss: 5.5605 - acc: 0.1516
Epoch 17/1000
 - 1s - loss: 5.5259 - acc: 0.1531
Epoch 18/1000
 - 1s - loss: 5.4928 - acc: 0.1553
Epoch 19/1000
 - 1s - loss: 5.4615 - acc: 0.1561
Epoch 20/1000
 - 1s - loss: 5.4314 - acc: 0.1594
Epoch 21/1000
 - 1s - loss: 5.4027 - acc: 0.1619
Epoch 22/1000
 - 1s - loss: 5.3747 - acc: 0.1638
Epoch 23/1000
 - 1s - loss: 5.3477 - acc: 0.1661
Epoch 24/1000
 - 1s - loss: 5.3218 - acc: 0.1684
Epoch 25/1000
 - 1s - loss: 5.2961 - acc: 0.1703
Epoch 26/1000
 - 1s - loss: 5.2715 - acc: 0.1731
Epoch 27/1000
 - 1s - loss: 5.2472 - acc: 0.1760
Epoch 28/1000
 - 1s - loss: 5.2236 - acc: 0.1786
Epoch 29/1000
 - 1s - loss: 5.2005 - acc: 0.1802
Epoch 30/1000
 - 1s - loss: 5.1777 - acc: 0.1826
Epoch 31/1000
 - 1s - loss: 5.1556 - acc: 0.1841
Epoch 32/1000
 - 1s - loss: 5.1339 - acc: 0.1861
Epoch 33/1000
 - 1s - loss: 5.1126 - acc: 0.1879
Epoch 34/1000
 - 1s - loss: 5.0919 - acc: 0.1908
Epoch 35/1000
 - 1s - loss: 5.0717 - acc: 0.1920
Epoch 36/1000
 - 1s - loss: 5.0517 - acc: 0.1952
Epoch 37/1000
 - 1s - loss: 5.0321 - acc: 0.1969
Epoch 38/1000
 - 1s - loss: 5.0131 - acc: 0.1987
Epoch 39/1000
 - 1s - loss: 4.9941 - acc: 0.1999
Epoch 40/1000
 - 1s - loss: 4.9761 - acc: 0.2019
Epoch 41/1000
 - 1s - loss: 4.9579 - acc: 0.2041
Epoch 42/1000
 - 1s - loss: 4.9402 - acc: 0.2052
Epoch 43/1000
 - 1s - loss: 4.9225 - acc: 0.2071
Epoch 44/1000
 - 1s - loss: 4.9054 - acc: 0.2087
Epoch 45/1000
 - 1s - loss: 4.8886 - acc: 0.2101
Epoch 46/1000
 - 1s - loss: 4.8722 - acc: 0.2122
Epoch 47/1000
 - 1s - loss: 4.8556 - acc: 0.2139
Epoch 48/1000
 - 1s - loss: 4.8395 - acc: 0.2156
Epoch 49/1000
 - 1s - loss: 4.8236 - acc: 0.2174
Epoch 50/1000
 - 1s - loss: 4.8078 - acc: 0.2188
Epoch 51/1000
 - 1s - loss: 4.7926 - acc: 0.2205
Epoch 52/1000
 - 1s - loss: 4.7775 - acc: 0.2221
Epoch 53/1000
 - 1s - loss: 4.7623 - acc: 0.2240
Epoch 54/1000
 - 1s - loss: 4.7475 - acc: 0.2257
Epoch 55/1000
 - 1s - loss: 4.7329 - acc: 0.2270
Epoch 56/1000
 - 1s - loss: 4.7185 - acc: 0.2293
Epoch 57/1000
 - 1s - loss: 4.7042 - acc: 0.2302
Epoch 58/1000
 - 1s - loss: 4.6901 - acc: 0.2316
Epoch 59/1000
 - 1s - loss: 4.6762 - acc: 0.2330
Epoch 60/1000
 - 1s - loss: 4.6624 - acc: 0.2341
Epoch 61/1000
 - 1s - loss: 4.6489 - acc: 0.2353
Epoch 62/1000
 - 1s - loss: 4.6353 - acc: 0.2368
Epoch 63/1000
 - 1s - loss: 4.6220 - acc: 0.2379
Epoch 64/1000
 - 1s - loss: 4.6092 - acc: 0.2397
Epoch 65/1000
 - 1s - loss: 4.5959 - acc: 0.2410
Epoch 66/1000
 - 1s - loss: 4.5832 - acc: 0.2423
Epoch 67/1000
 - 1s - loss: 4.5706 - acc: 0.2432
Epoch 68/1000
 - 1s - loss: 4.5581 - acc: 0.2451
Epoch 69/1000
 - 1s - loss: 4.5456 - acc: 0.2455
Epoch 70/1000
 - 1s - loss: 4.5333 - acc: 0.2475
Epoch 71/1000
 - 1s - loss: 4.5211 - acc: 0.2477
Epoch 72/1000
 - 1s - loss: 4.5093 - acc: 0.2498
Epoch 73/1000
 - 1s - loss: 4.4973 - acc: 0.2508
Epoch 74/1000
 - 1s - loss: 4.4856 - acc: 0.2510
Epoch 75/1000
 - 1s - loss: 4.4740 - acc: 0.2525
Epoch 76/1000
 - 1s - loss: 4.4625 - acc: 0.2537
Epoch 77/1000
 - 1s - loss: 4.4511 - acc: 0.2554
Epoch 78/1000
 - 1s - loss: 4.4398 - acc: 0.2558
Epoch 79/1000
 - 1s - loss: 4.4285 - acc: 0.2563
Epoch 80/1000
 - 1s - loss: 4.4174 - acc: 0.2578
Epoch 81/1000
 - 1s - loss: 4.4064 - acc: 0.2590
Epoch 82/1000
 - 1s - loss: 4.3958 - acc: 0.2596
Epoch 83/1000
 - 1s - loss: 4.3847 - acc: 0.2609
Epoch 84/1000
 - 1s - loss: 4.3741 - acc: 0.2620
Epoch 85/1000
 - 1s - loss: 4.3636 - acc: 0.2628
Epoch 86/1000
 - 1s - loss: 4.3531 - acc: 0.2643
Epoch 87/1000
 - 1s - loss: 4.3426 - acc: 0.2640
Epoch 88/1000
 - 1s - loss: 4.3321 - acc: 0.2671
Epoch 89/1000
 - 1s - loss: 4.3220 - acc: 0.2661
Epoch 90/1000
 - 1s - loss: 4.3116 - acc: 0.2687
Epoch 91/1000
 - 1s - loss: 4.3015 - acc: 0.2688
Epoch 92/1000
 - 1s - loss: 4.2915 - acc: 0.2694
Epoch 93/1000
 - 1s - loss: 4.2815 - acc: 0.2713
Epoch 94/1000
 - 1s - loss: 4.2715 - acc: 0.2716
Epoch 95/1000
 - 1s - loss: 4.2615 - acc: 0.2723
Epoch 96/1000
 - 1s - loss: 4.2517 - acc: 0.2740
Epoch 97/1000
 - 1s - loss: 4.2421 - acc: 0.2754
Epoch 98/1000
 - 1s - loss: 4.2322 - acc: 0.2760
Epoch 99/1000
 - 1s - loss: 4.2227 - acc: 0.2769
Epoch 100/1000
 - 1s - loss: 4.2131 - acc: 0.2777
Epoch 101/1000
 - 1s - loss: 4.2038 - acc: 0.2779
Epoch 102/1000
 - 1s - loss: 4.1943 - acc: 0.2796
Epoch 103/1000
 - 1s - loss: 4.1848 - acc: 0.2803
Epoch 104/1000
 - 1s - loss: 4.1752 - acc: 0.2816
Epoch 105/1000
 - 1s - loss: 4.1659 - acc: 0.2830
Epoch 106/1000
 - 1s - loss: 4.1568 - acc: 0.2833
Epoch 107/1000
 - 1s - loss: 4.1476 - acc: 0.2850
Epoch 108/1000
 - 1s - loss: 4.1385 - acc: 0.2844
Epoch 109/1000
 - 1s - loss: 4.1293 - acc: 0.2858
Epoch 110/1000
 - 1s - loss: 4.1203 - acc: 0.2866
Epoch 111/1000
 - 1s - loss: 4.1113 - acc: 0.2876
Epoch 112/1000
 - 1s - loss: 4.1022 - acc: 0.2885
Epoch 113/1000
 - 1s - loss: 4.0934 - acc: 0.2891
Epoch 114/1000
 - 1s - loss: 4.0846 - acc: 0.2906
Epoch 115/1000
 - 1s - loss: 4.0755 - acc: 0.2904
Epoch 116/1000
 - 1s - loss: 4.0667 - acc: 0.2922
Epoch 117/1000
 - 1s - loss: 4.0578 - acc: 0.2922
Epoch 118/1000
 - 1s - loss: 4.0493 - acc: 0.2936
Epoch 119/1000
 - 1s - loss: 4.0405 - acc: 0.2938
Epoch 120/1000
 - 1s - loss: 4.0318 - acc: 0.2945
Epoch 121/1000
 - 1s - loss: 4.0230 - acc: 0.2955
Epoch 122/1000
 - 1s - loss: 4.0144 - acc: 0.2963
Epoch 123/1000
 - 1s - loss: 4.0061 - acc: 0.2977
Epoch 124/1000
 - 1s - loss: 3.9973 - acc: 0.2985
Epoch 125/1000
 - 1s - loss: 3.9893 - acc: 0.2989
Epoch 126/1000
 - 1s - loss: 3.9806 - acc: 0.2998
Epoch 127/1000
 - 1s - loss: 3.9723 - acc: 0.3009
Epoch 128/1000
 - 1s - loss: 3.9638 - acc: 0.3014
Epoch 129/1000
 - 1s - loss: 3.9556 - acc: 0.3016
Epoch 130/1000
 - 1s - loss: 3.9474 - acc: 0.3022
Epoch 131/1000
 - 1s - loss: 3.9390 - acc: 0.3035
Epoch 132/1000
 - 1s - loss: 3.9306 - acc: 0.3044
Epoch 133/1000
 - 1s - loss: 3.9226 - acc: 0.3048
Epoch 134/1000
 - 1s - loss: 3.9145 - acc: 0.3059
Epoch 135/1000
 - 1s - loss: 3.9063 - acc: 0.3066
Epoch 136/1000
 - 1s - loss: 3.8984 - acc: 0.3072
Epoch 137/1000
 - 1s - loss: 3.8904 - acc: 0.3084
Epoch 138/1000
 - 1s - loss: 3.8822 - acc: 0.3091
Epoch 139/1000
 - 1s - loss: 3.8741 - acc: 0.3098
Epoch 140/1000
 - 1s - loss: 3.8662 - acc: 0.3108
Epoch 141/1000
 - 1s - loss: 3.8581 - acc: 0.3118
Epoch 142/1000
 - 1s - loss: 3.8505 - acc: 0.3118
Epoch 143/1000
 - 1s - loss: 3.8429 - acc: 0.3131
Epoch 144/1000
 - 1s - loss: 3.8349 - acc: 0.3141
Epoch 145/1000
 - 1s - loss: 3.8271 - acc: 0.3144
Epoch 146/1000
 - 1s - loss: 3.8192 - acc: 0.3149
Epoch 147/1000
 - 1s - loss: 3.8116 - acc: 0.3159
Epoch 148/1000
 - 1s - loss: 3.8041 - acc: 0.3164
Epoch 149/1000
 - 1s - loss: 3.7962 - acc: 0.3183
Epoch 150/1000
 - 1s - loss: 3.7887 - acc: 0.3185
Epoch 151/1000
 - 1s - loss: 3.7810 - acc: 0.3197
Epoch 152/1000
 - 1s - loss: 3.7737 - acc: 0.3198
Epoch 153/1000
 - 1s - loss: 3.7661 - acc: 0.3217
Epoch 154/1000
 - 1s - loss: 3.7583 - acc: 0.3228
Epoch 155/1000
 - 1s - loss: 3.7510 - acc: 0.3226
Epoch 156/1000
 - 1s - loss: 3.7436 - acc: 0.3234
Epoch 157/1000
 - 1s - loss: 3.7362 - acc: 0.3247
Epoch 158/1000
 - 1s - loss: 3.7288 - acc: 0.3246
Epoch 159/1000
 - 1s - loss: 3.7214 - acc: 0.3251
Epoch 160/1000
 - 1s - loss: 3.7140 - acc: 0.3275
Epoch 161/1000
 - 1s - loss: 3.7068 - acc: 0.3275
Epoch 162/1000
 - 1s - loss: 3.6995 - acc: 0.3287
Epoch 163/1000
 - 1s - loss: 3.6924 - acc: 0.3290
Epoch 164/1000
 - 1s - loss: 3.6849 - acc: 0.3303
Epoch 165/1000
 - 1s - loss: 3.6777 - acc: 0.3302
Epoch 166/1000
 - 1s - loss: 3.6706 - acc: 0.3310
Epoch 167/1000
 - 1s - loss: 3.6637 - acc: 0.3312
Epoch 168/1000
 - 1s - loss: 3.6566 - acc: 0.3330
Epoch 169/1000
 - 1s - loss: 3.6495 - acc: 0.3346
Epoch 170/1000
 - 1s - loss: 3.6424 - acc: 0.3343
Epoch 171/1000
 - 1s - loss: 3.6352 - acc: 0.3348
Epoch 172/1000
 - 1s - loss: 3.6284 - acc: 0.3354
Epoch 173/1000
 - 1s - loss: 3.6213 - acc: 0.3371
Epoch 174/1000
 - 1s - loss: 3.6143 - acc: 0.3375
Epoch 175/1000
 - 1s - loss: 3.6075 - acc: 0.3384
Epoch 176/1000
 - 1s - loss: 3.6005 - acc: 0.3386
Epoch 177/1000
 - 1s - loss: 3.5936 - acc: 0.3397
Epoch 178/1000
 - 1s - loss: 3.5867 - acc: 0.3407
Epoch 179/1000
 - 1s - loss: 3.5800 - acc: 0.3409
Epoch 180/1000
 - 1s - loss: 3.5732 - acc: 0.3412
Epoch 181/1000
 - 1s - loss: 3.5661 - acc: 0.3424
Epoch 182/1000
 - 1s - loss: 3.5592 - acc: 0.3424
Epoch 183/1000
 - 1s - loss: 3.5527 - acc: 0.3439
Epoch 184/1000
 - 1s - loss: 3.5461 - acc: 0.3437
Epoch 185/1000
 - 1s - loss: 3.5394 - acc: 0.3443
Epoch 186/1000
 - 1s - loss: 3.5325 - acc: 0.3453
Epoch 187/1000
 - 1s - loss: 3.5260 - acc: 0.3456
Epoch 188/1000
 - 1s - loss: 3.5194 - acc: 0.3467
Epoch 189/1000
 - 1s - loss: 3.5126 - acc: 0.3469
Epoch 190/1000
 - 1s - loss: 3.5062 - acc: 0.3475
Epoch 191/1000
 - 1s - loss: 3.4996 - acc: 0.3489
Epoch 192/1000
 - 1s - loss: 3.4929 - acc: 0.3498
Epoch 193/1000
 - 1s - loss: 3.4862 - acc: 0.3505
Epoch 194/1000
 - 1s - loss: 3.4797 - acc: 0.3512
Epoch 195/1000
 - 1s - loss: 3.4734 - acc: 0.3522
Epoch 196/1000
 - 1s - loss: 3.4669 - acc: 0.3521
Epoch 197/1000
 - 1s - loss: 3.4603 - acc: 0.3536
Epoch 198/1000
 - 1s - loss: 3.4540 - acc: 0.3536
Epoch 199/1000
 - 1s - loss: 3.4476 - acc: 0.3542
Epoch 200/1000
 - 1s - loss: 3.4411 - acc: 0.3551
Epoch 201/1000
 - 1s - loss: 3.4348 - acc: 0.3553
Epoch 202/1000
 - 1s - loss: 3.4284 - acc: 0.3557
Epoch 203/1000
 - 1s - loss: 3.4219 - acc: 0.3576
Epoch 204/1000
 - 1s - loss: 3.4157 - acc: 0.3588
Epoch 205/1000
 - 1s - loss: 3.4094 - acc: 0.3582
Epoch 206/1000
 - 1s - loss: 3.4030 - acc: 0.3595
Epoch 207/1000
 - 1s - loss: 3.3966 - acc: 0.3603
Epoch 208/1000
 - 1s - loss: 3.3903 - acc: 0.3605
Epoch 209/1000
 - 1s - loss: 3.3842 - acc: 0.3607
Epoch 210/1000
 - 1s - loss: 3.3776 - acc: 0.3618
Epoch 211/1000
 - 1s - loss: 3.3719 - acc: 0.3617
Epoch 212/1000
 - 1s - loss: 3.3656 - acc: 0.3630
Epoch 213/1000
 - 1s - loss: 3.3593 - acc: 0.3636
Epoch 214/1000
 - 1s - loss: 3.3533 - acc: 0.3645
Epoch 215/1000
 - 1s - loss: 3.3472 - acc: 0.3642
Epoch 216/1000
 - 1s - loss: 3.3407 - acc: 0.3663
Epoch 217/1000
 - 1s - loss: 3.3350 - acc: 0.3656
Epoch 218/1000
 - 1s - loss: 3.3286 - acc: 0.3678
Epoch 219/1000
 - 1s - loss: 3.3229 - acc: 0.3673
Epoch 220/1000
 - 1s - loss: 3.3167 - acc: 0.3680
Epoch 221/1000
 - 1s - loss: 3.3107 - acc: 0.3684
Epoch 222/1000
 - 1s - loss: 3.3044 - acc: 0.3693
Epoch 223/1000
 - 1s - loss: 3.2986 - acc: 0.3702
Epoch 224/1000
 - 1s - loss: 3.2926 - acc: 0.3697
Epoch 225/1000
 - 1s - loss: 3.2865 - acc: 0.3711
Epoch 226/1000
 - 1s - loss: 3.2808 - acc: 0.3719
Epoch 227/1000
 - 1s - loss: 3.2749 - acc: 0.3729
Epoch 228/1000
 - 1s - loss: 3.2686 - acc: 0.3724
Epoch 229/1000
 - 1s - loss: 3.2626 - acc: 0.3751
Epoch 230/1000
 - 1s - loss: 3.2570 - acc: 0.3751
Epoch 231/1000
 - 1s - loss: 3.2511 - acc: 0.3761
Epoch 232/1000
 - 1s - loss: 3.2453 - acc: 0.3771
Epoch 233/1000
 - 1s - loss: 3.2392 - acc: 0.3761
Epoch 234/1000
 - 1s - loss: 3.2338 - acc: 0.3777
Epoch 235/1000
 - 1s - loss: 3.2276 - acc: 0.3781
Epoch 236/1000
 - 1s - loss: 3.2218 - acc: 0.3798
Epoch 237/1000
 - 1s - loss: 3.2160 - acc: 0.3803
Epoch 238/1000
 - 1s - loss: 3.2104 - acc: 0.3811
Epoch 239/1000
 - 1s - loss: 3.2043 - acc: 0.3814
Epoch 240/1000
 - 1s - loss: 3.1984 - acc: 0.3835
Epoch 241/1000
 - 1s - loss: 3.1928 - acc: 0.3828
Epoch 242/1000
 - 1s - loss: 3.1872 - acc: 0.3836
Epoch 243/1000
 - 1s - loss: 3.1814 - acc: 0.3842
Epoch 244/1000
 - 1s - loss: 3.1760 - acc: 0.3846
Epoch 245/1000
 - 1s - loss: 3.1700 - acc: 0.3859
Epoch 246/1000
 - 1s - loss: 3.1643 - acc: 0.3848
Epoch 247/1000
 - 1s - loss: 3.1589 - acc: 0.3861
Epoch 248/1000
 - 1s - loss: 3.1529 - acc: 0.3869
Epoch 249/1000
 - 1s - loss: 3.1476 - acc: 0.3876
Epoch 250/1000
 - 1s - loss: 3.1417 - acc: 0.3882
Epoch 251/1000
 - 1s - loss: 3.1364 - acc: 0.3891
Epoch 252/1000
 - 1s - loss: 3.1307 - acc: 0.3897
Epoch 253/1000
 - 1s - loss: 3.1251 - acc: 0.3906
Epoch 254/1000
 - 1s - loss: 3.1195 - acc: 0.3903
Epoch 255/1000
 - 1s - loss: 3.1141 - acc: 0.3907
Epoch 256/1000
 - 1s - loss: 3.1086 - acc: 0.3923
Epoch 257/1000
 - 1s - loss: 3.1029 - acc: 0.3913
Epoch 258/1000
 - 1s - loss: 3.0972 - acc: 0.3925
Epoch 259/1000
 - 1s - loss: 3.0922 - acc: 0.3925
Epoch 260/1000
 - 1s - loss: 3.0863 - acc: 0.3942
Epoch 261/1000
 - 1s - loss: 3.0808 - acc: 0.3947
Epoch 262/1000
 - 1s - loss: 3.0754 - acc: 0.3953
Epoch 263/1000
 - 1s - loss: 3.0699 - acc: 0.3962
Epoch 264/1000
 - 1s - loss: 3.0648 - acc: 0.3963
Epoch 265/1000
 - 1s - loss: 3.0591 - acc: 0.3972
Epoch 266/1000
 - 1s - loss: 3.0539 - acc: 0.3979
Epoch 267/1000
 - 1s - loss: 3.0486 - acc: 0.3987
Epoch 268/1000
 - 1s - loss: 3.0430 - acc: 0.3989
Epoch 269/1000
 - 1s - loss: 3.0377 - acc: 0.3992
Epoch 270/1000
 - 1s - loss: 3.0323 - acc: 0.4005
Epoch 271/1000
 - 1s - loss: 3.0269 - acc: 0.4016
Epoch 272/1000
 - 1s - loss: 3.0217 - acc: 0.4019
Epoch 273/1000
 - 1s - loss: 3.0165 - acc: 0.4028
Epoch 274/1000
 - 1s - loss: 3.0111 - acc: 0.4031
Epoch 275/1000
 - 1s - loss: 3.0057 - acc: 0.4029
Epoch 276/1000
 - 1s - loss: 3.0005 - acc: 0.4054
Epoch 277/1000
 - 1s - loss: 2.9951 - acc: 0.4055
Epoch 278/1000
 - 1s - loss: 2.9899 - acc: 0.4061
Epoch 279/1000
 - 1s - loss: 2.9845 - acc: 0.4060
Epoch 280/1000
 - 1s - loss: 2.9797 - acc: 0.4073
Epoch 281/1000
 - 1s - loss: 2.9741 - acc: 0.4085
Epoch 282/1000
 - 1s - loss: 2.9691 - acc: 0.4090
Epoch 283/1000
 - 1s - loss: 2.9641 - acc: 0.4089
Epoch 284/1000
 - 1s - loss: 2.9589 - acc: 0.4107
Epoch 285/1000
 - 1s - loss: 2.9536 - acc: 0.4105
Epoch 286/1000
 - 1s - loss: 2.9483 - acc: 0.4114
Epoch 287/1000
 - 1s - loss: 2.9433 - acc: 0.4123
Epoch 288/1000
 - 1s - loss: 2.9384 - acc: 0.4125
Epoch 289/1000
 - 1s - loss: 2.9334 - acc: 0.4133
Epoch 290/1000
 - 1s - loss: 2.9282 - acc: 0.4143
Epoch 291/1000
 - 1s - loss: 2.9229 - acc: 0.4147
Epoch 292/1000
 - 1s - loss: 2.9178 - acc: 0.4145
Epoch 293/1000
 - 1s - loss: 2.9130 - acc: 0.4162
Epoch 294/1000
 - 1s - loss: 2.9079 - acc: 0.4180
Epoch 295/1000
 - 1s - loss: 2.9028 - acc: 0.4180
Epoch 296/1000
 - 1s - loss: 2.8977 - acc: 0.4187
Epoch 297/1000
 - 1s - loss: 2.8927 - acc: 0.4187
Epoch 298/1000
 - 1s - loss: 2.8879 - acc: 0.4199
Epoch 299/1000
 - 1s - loss: 2.8824 - acc: 0.4210
Epoch 300/1000
 - 1s - loss: 2.8775 - acc: 0.4208
Epoch 301/1000
 - 1s - loss: 2.8726 - acc: 0.4229
Epoch 302/1000
 - 1s - loss: 2.8678 - acc: 0.4221
Epoch 303/1000
 - 1s - loss: 2.8627 - acc: 0.4225
Epoch 304/1000
 - 1s - loss: 2.8580 - acc: 0.4235
Epoch 305/1000
 - 1s - loss: 2.8529 - acc: 0.4242
Epoch 306/1000
 - 1s - loss: 2.8479 - acc: 0.4253
Epoch 307/1000
 - 1s - loss: 2.8433 - acc: 0.4269
Epoch 308/1000
 - 1s - loss: 2.8381 - acc: 0.4263
Epoch 309/1000
 - 1s - loss: 2.8335 - acc: 0.4275
Epoch 310/1000
 - 1s - loss: 2.8286 - acc: 0.4279
Epoch 311/1000
 - 1s - loss: 2.8237 - acc: 0.4279
Epoch 312/1000
 - 1s - loss: 2.8189 - acc: 0.4299
Epoch 313/1000
 - 1s - loss: 2.8140 - acc: 0.4295
Epoch 314/1000
 - 1s - loss: 2.8092 - acc: 0.4314
Epoch 315/1000
 - 1s - loss: 2.8044 - acc: 0.4318
Epoch 316/1000
 - 1s - loss: 2.7997 - acc: 0.4316
Epoch 317/1000
 - 1s - loss: 2.7947 - acc: 0.4312
Epoch 318/1000
 - 1s - loss: 2.7900 - acc: 0.4331
Epoch 319/1000
 - 1s - loss: 2.7854 - acc: 0.4337
Epoch 320/1000
 - 1s - loss: 2.7803 - acc: 0.4345
Epoch 321/1000
 - 1s - loss: 2.7759 - acc: 0.4346
Epoch 322/1000
 - 1s - loss: 2.7709 - acc: 0.4351
Epoch 323/1000
 - 1s - loss: 2.7665 - acc: 0.4362
Epoch 324/1000
 - 1s - loss: 2.7614 - acc: 0.4359
Epoch 325/1000
 - 1s - loss: 2.7569 - acc: 0.4370
Epoch 326/1000
 - 1s - loss: 2.7524 - acc: 0.4380
Epoch 327/1000
 - 1s - loss: 2.7475 - acc: 0.4384
Epoch 328/1000
 - 1s - loss: 2.7427 - acc: 0.4395
Epoch 329/1000
 - 1s - loss: 2.7382 - acc: 0.4388
Epoch 330/1000
 - 1s - loss: 2.7333 - acc: 0.4406
Epoch 331/1000
 - 1s - loss: 2.7289 - acc: 0.4410
Epoch 332/1000
 - 1s - loss: 2.7241 - acc: 0.4414
Epoch 333/1000
 - 1s - loss: 2.7199 - acc: 0.4434
Epoch 334/1000
 - 1s - loss: 2.7151 - acc: 0.4422
Epoch 335/1000
 - 1s - loss: 2.7105 - acc: 0.4443
Epoch 336/1000
 - 1s - loss: 2.7060 - acc: 0.4443
Epoch 337/1000
 - 1s - loss: 2.7011 - acc: 0.4452
Epoch 338/1000
 - 1s - loss: 2.6969 - acc: 0.4455
Epoch 339/1000
 - 1s - loss: 2.6921 - acc: 0.4455
Epoch 340/1000
 - 1s - loss: 2.6877 - acc: 0.4467
Epoch 341/1000
 - 1s - loss: 2.6830 - acc: 0.4473
Epoch 342/1000
 - 1s - loss: 2.6788 - acc: 0.4481
Epoch 343/1000
 - 1s - loss: 2.6740 - acc: 0.4487
Epoch 344/1000
 - 1s - loss: 2.6696 - acc: 0.4497
Epoch 345/1000
 - 1s - loss: 2.6653 - acc: 0.4494
Epoch 346/1000
 - 1s - loss: 2.6613 - acc: 0.4496
Epoch 347/1000
 - 1s - loss: 2.6564 - acc: 0.4514
Epoch 348/1000
 - 1s - loss: 2.6521 - acc: 0.4505
Epoch 349/1000
 - 1s - loss: 2.6473 - acc: 0.4517
Epoch 350/1000
 - 1s - loss: 2.6429 - acc: 0.4517
Epoch 351/1000
 - 1s - loss: 2.6387 - acc: 0.4522
Epoch 352/1000
 - 1s - loss: 2.6343 - acc: 0.4544
Epoch 353/1000
 - 1s - loss: 2.6297 - acc: 0.4538
Epoch 354/1000
 - 1s - loss: 2.6254 - acc: 0.4544
Epoch 355/1000
 - 1s - loss: 2.6211 - acc: 0.4550
Epoch 356/1000
 - 1s - loss: 2.6167 - acc: 0.4562
Epoch 357/1000
 - 1s - loss: 2.6125 - acc: 0.4566
Epoch 358/1000
 - 1s - loss: 2.6078 - acc: 0.4563
Epoch 359/1000
 - 1s - loss: 2.6039 - acc: 0.4578
Epoch 360/1000
 - 1s - loss: 2.5994 - acc: 0.4582
Epoch 361/1000
 - 1s - loss: 2.5948 - acc: 0.4590
Epoch 362/1000
 - 1s - loss: 2.5908 - acc: 0.4591
Epoch 363/1000
 - 1s - loss: 2.5867 - acc: 0.4587
Epoch 364/1000
 - 1s - loss: 2.5825 - acc: 0.4612
Epoch 365/1000
 - 1s - loss: 2.5781 - acc: 0.4614
Epoch 366/1000
 - 1s - loss: 2.5737 - acc: 0.4611
Epoch 367/1000
 - 1s - loss: 2.5694 - acc: 0.4630
Epoch 368/1000
 - 1s - loss: 2.5652 - acc: 0.4626
Epoch 369/1000
 - 1s - loss: 2.5609 - acc: 0.4627
Epoch 370/1000
 - 1s - loss: 2.5569 - acc: 0.4644
Epoch 371/1000
 - 1s - loss: 2.5525 - acc: 0.4639
Epoch 372/1000
 - 1s - loss: 2.5483 - acc: 0.4645
Epoch 373/1000
 - 1s - loss: 2.5440 - acc: 0.4659
Epoch 374/1000
 - 1s - loss: 2.5398 - acc: 0.4649
Epoch 375/1000
 - 1s - loss: 2.5358 - acc: 0.4678
Epoch 376/1000
 - 1s - loss: 2.5314 - acc: 0.4670
Epoch 377/1000
 - 1s - loss: 2.5275 - acc: 0.4673
Epoch 378/1000
 - 1s - loss: 2.5235 - acc: 0.4688
Epoch 379/1000
 - 1s - loss: 2.5189 - acc: 0.4689
Epoch 380/1000
 - 1s - loss: 2.5151 - acc: 0.4678
Epoch 381/1000
 - 1s - loss: 2.5111 - acc: 0.4692
Epoch 382/1000
 - 1s - loss: 2.5071 - acc: 0.4706
Epoch 383/1000
 - 1s - loss: 2.5030 - acc: 0.4706
Epoch 384/1000
 - 1s - loss: 2.4989 - acc: 0.4719
Epoch 385/1000
 - 1s - loss: 2.4950 - acc: 0.4711
Epoch 386/1000
 - 1s - loss: 2.4906 - acc: 0.4731
Epoch 387/1000
 - 1s - loss: 2.4869 - acc: 0.4723
Epoch 388/1000
 - 1s - loss: 2.4828 - acc: 0.4738
Epoch 389/1000
 - 1s - loss: 2.4785 - acc: 0.4742
Epoch 390/1000
 - 1s - loss: 2.4745 - acc: 0.4743
Epoch 391/1000
 - 1s - loss: 2.4705 - acc: 0.4756
Epoch 392/1000
 - 1s - loss: 2.4663 - acc: 0.4755
Epoch 393/1000
 - 1s - loss: 2.4625 - acc: 0.4748
Epoch 394/1000
 - 1s - loss: 2.4588 - acc: 0.4779
Epoch 395/1000
 - 1s - loss: 2.4547 - acc: 0.4772
Epoch 396/1000
 - 1s - loss: 2.4504 - acc: 0.4782
Epoch 397/1000
 - 1s - loss: 2.4466 - acc: 0.4781
Epoch 398/1000
 - 1s - loss: 2.4430 - acc: 0.4787
Epoch 399/1000
 - 1s - loss: 2.4388 - acc: 0.4809
Epoch 400/1000
 - 1s - loss: 2.4349 - acc: 0.4807
Epoch 401/1000
 - 1s - loss: 2.4310 - acc: 0.4805
Epoch 402/1000
 - 1s - loss: 2.4273 - acc: 0.4812
Epoch 403/1000
 - 1s - loss: 2.4233 - acc: 0.4817
Epoch 404/1000
 - 1s - loss: 2.4193 - acc: 0.4823
Epoch 405/1000
 - 1s - loss: 2.4154 - acc: 0.4828
Epoch 406/1000
 - 1s - loss: 2.4118 - acc: 0.4833
Epoch 407/1000
 - 1s - loss: 2.4076 - acc: 0.4836
Epoch 408/1000
 - 1s - loss: 2.4040 - acc: 0.4850
Epoch 409/1000
 - 1s - loss: 2.4000 - acc: 0.4845
Epoch 410/1000
 - 1s - loss: 2.3966 - acc: 0.4859
Epoch 411/1000
 - 1s - loss: 2.3925 - acc: 0.4857
Epoch 412/1000
 - 1s - loss: 2.3886 - acc: 0.4878
Epoch 413/1000
 - 1s - loss: 2.3849 - acc: 0.4883
Epoch 414/1000
 - 1s - loss: 2.3811 - acc: 0.4891
Epoch 415/1000
 - 1s - loss: 2.3773 - acc: 0.4900
Epoch 416/1000
 - 1s - loss: 2.3734 - acc: 0.4890
Epoch 417/1000
 - 1s - loss: 2.3697 - acc: 0.4901
Epoch 418/1000
 - 1s - loss: 2.3663 - acc: 0.4908
Epoch 419/1000
 - 1s - loss: 2.3621 - acc: 0.4919
Epoch 420/1000
 - 1s - loss: 2.3586 - acc: 0.4914
Epoch 421/1000
 - 1s - loss: 2.3549 - acc: 0.4921
Epoch 422/1000
 - 1s - loss: 2.3509 - acc: 0.4938
Epoch 423/1000
 - 1s - loss: 2.3475 - acc: 0.4942
Epoch 424/1000
 - 1s - loss: 2.3436 - acc: 0.4930
Epoch 425/1000
 - 1s - loss: 2.3398 - acc: 0.4953
Epoch 426/1000
 - 1s - loss: 2.3366 - acc: 0.4950
Epoch 427/1000
 - 1s - loss: 2.3326 - acc: 0.4947
Epoch 428/1000
 - 1s - loss: 2.3294 - acc: 0.4956
Epoch 429/1000
 - 1s - loss: 2.3252 - acc: 0.4955
Epoch 430/1000
 - 1s - loss: 2.3219 - acc: 0.4973
Epoch 431/1000
 - 1s - loss: 2.3180 - acc: 0.4974
Epoch 432/1000
 - 1s - loss: 2.3145 - acc: 0.4985
Epoch 433/1000
 - 1s - loss: 2.3106 - acc: 0.4988
Epoch 434/1000
 - 1s - loss: 2.3074 - acc: 0.5001
Epoch 435/1000
 - 1s - loss: 2.3037 - acc: 0.4982
Epoch 436/1000
 - 1s - loss: 2.3004 - acc: 0.4992
Epoch 437/1000
 - 1s - loss: 2.2965 - acc: 0.5012
Epoch 438/1000
 - 1s - loss: 2.2930 - acc: 0.5013
Epoch 439/1000
 - 1s - loss: 2.2893 - acc: 0.5012
Epoch 440/1000
 - 1s - loss: 2.2857 - acc: 0.5008
Epoch 441/1000
 - 1s - loss: 2.2822 - acc: 0.5030
Epoch 442/1000
 - 1s - loss: 2.2787 - acc: 0.5031
Epoch 443/1000
 - 1s - loss: 2.2752 - acc: 0.5046
Epoch 444/1000
 - 1s - loss: 2.2714 - acc: 0.5043
Epoch 445/1000
 - 1s - loss: 2.2682 - acc: 0.5045
Epoch 446/1000
 - 1s - loss: 2.2648 - acc: 0.5054
Epoch 447/1000
 - 1s - loss: 2.2612 - acc: 0.5056
Epoch 448/1000
 - 1s - loss: 2.2575 - acc: 0.5073
Epoch 449/1000
 - 1s - loss: 2.2539 - acc: 0.5073
Epoch 450/1000
 - 1s - loss: 2.2507 - acc: 0.5082
Epoch 451/1000
 - 1s - loss: 2.2470 - acc: 0.5076
Epoch 452/1000
 - 1s - loss: 2.2439 - acc: 0.5096
Epoch 453/1000
 - 1s - loss: 2.2403 - acc: 0.5084
Epoch 454/1000
 - 1s - loss: 2.2367 - acc: 0.5098
Epoch 455/1000
 - 1s - loss: 2.2335 - acc: 0.5102
Epoch 456/1000
 - 1s - loss: 2.2300 - acc: 0.5114
Epoch 457/1000
 - 1s - loss: 2.2268 - acc: 0.5119
Epoch 458/1000
 - 1s - loss: 2.2233 - acc: 0.5124
Epoch 459/1000
 - 1s - loss: 2.2196 - acc: 0.5125
Epoch 460/1000
 - 1s - loss: 2.2163 - acc: 0.5122
Epoch 461/1000
 - 1s - loss: 2.2133 - acc: 0.5142
Epoch 462/1000
 - 1s - loss: 2.2094 - acc: 0.5145
Epoch 463/1000
 - 1s - loss: 2.2062 - acc: 0.5153
Epoch 464/1000
 - 1s - loss: 2.2026 - acc: 0.5151
Epoch 465/1000
 - 1s - loss: 2.1999 - acc: 0.5166
Epoch 466/1000
 - 1s - loss: 2.1963 - acc: 0.5161
Epoch 467/1000
 - 1s - loss: 2.1930 - acc: 0.5165
Epoch 468/1000
 - 1s - loss: 2.1896 - acc: 0.5176
Epoch 469/1000
 - 1s - loss: 2.1863 - acc: 0.5176
Epoch 470/1000
 - 1s - loss: 2.1830 - acc: 0.5171
Epoch 471/1000
 - 1s - loss: 2.1797 - acc: 0.5193
Epoch 472/1000
 - 1s - loss: 2.1760 - acc: 0.5192
Epoch 473/1000
 - 1s - loss: 2.1728 - acc: 0.5205
Epoch 474/1000
 - 1s - loss: 2.1696 - acc: 0.5213
Epoch 475/1000
 - 1s - loss: 2.1665 - acc: 0.5221
Epoch 476/1000
 - 1s - loss: 2.1633 - acc: 0.5228
Epoch 477/1000
 - 1s - loss: 2.1603 - acc: 0.5223
Epoch 478/1000
 - 1s - loss: 2.1565 - acc: 0.5233
Epoch 479/1000
 - 1s - loss: 2.1535 - acc: 0.5243
Epoch 480/1000
 - 1s - loss: 2.1499 - acc: 0.5250
Epoch 481/1000
 - 1s - loss: 2.1471 - acc: 0.5248
Epoch 482/1000
 - 1s - loss: 2.1440 - acc: 0.5258
Epoch 483/1000
 - 1s - loss: 2.1404 - acc: 0.5270
Epoch 484/1000
 - 1s - loss: 2.1376 - acc: 0.5276
Epoch 485/1000
 - 1s - loss: 2.1345 - acc: 0.5281
Epoch 486/1000
 - 1s - loss: 2.1311 - acc: 0.5282
Epoch 487/1000
 - 1s - loss: 2.1282 - acc: 0.5290
Epoch 488/1000
 - 1s - loss: 2.1245 - acc: 0.5300
Epoch 489/1000
 - 1s - loss: 2.1214 - acc: 0.5293
Epoch 490/1000
 - 1s - loss: 2.1181 - acc: 0.5309
Epoch 491/1000
 - 1s - loss: 2.1150 - acc: 0.5315
Epoch 492/1000
 - 1s - loss: 2.1115 - acc: 0.5327
Epoch 493/1000
 - 1s - loss: 2.1088 - acc: 0.5312
Epoch 494/1000
 - 1s - loss: 2.1056 - acc: 0.5334
Epoch 495/1000
 - 1s - loss: 2.1026 - acc: 0.5345
Epoch 496/1000
 - 1s - loss: 2.0993 - acc: 0.5339
Epoch 497/1000
 - 1s - loss: 2.0965 - acc: 0.5346
Epoch 498/1000
 - 1s - loss: 2.0933 - acc: 0.5342
Epoch 499/1000
 - 1s - loss: 2.0901 - acc: 0.5370
Epoch 500/1000
 - 1s - loss: 2.0870 - acc: 0.5351
Epoch 501/1000
 - 1s - loss: 2.0839 - acc: 0.5359
Epoch 502/1000
 - 1s - loss: 2.0810 - acc: 0.5366
Epoch 503/1000
 - 1s - loss: 2.0779 - acc: 0.5383
Epoch 504/1000
 - 1s - loss: 2.0749 - acc: 0.5368
Epoch 505/1000
 - 1s - loss: 2.0716 - acc: 0.5396
Epoch 506/1000
 - 1s - loss: 2.0688 - acc: 0.5389
Epoch 507/1000
 - 1s - loss: 2.0657 - acc: 0.5404
Epoch 508/1000
 - 1s - loss: 2.0627 - acc: 0.5403
Epoch 509/1000
 - 1s - loss: 2.0596 - acc: 0.5401
Epoch 510/1000
 - 1s - loss: 2.0566 - acc: 0.5411
Epoch 511/1000
 - 1s - loss: 2.0537 - acc: 0.5418
Epoch 512/1000
 - 1s - loss: 2.0504 - acc: 0.5430
Epoch 513/1000
 - 1s - loss: 2.0476 - acc: 0.5423
Epoch 514/1000
 - 1s - loss: 2.0448 - acc: 0.5432
Epoch 515/1000
 - 1s - loss: 2.0418 - acc: 0.5447
Epoch 516/1000
 - 1s - loss: 2.0388 - acc: 0.5439
Epoch 517/1000
 - 1s - loss: 2.0358 - acc: 0.5433
Epoch 518/1000
 - 1s - loss: 2.0328 - acc: 0.5455
Epoch 519/1000
 - 1s - loss: 2.0298 - acc: 0.5461
Epoch 520/1000
 - 1s - loss: 2.0267 - acc: 0.5464
Epoch 521/1000
 - 1s - loss: 2.0242 - acc: 0.5468
Epoch 522/1000
 - 1s - loss: 2.0211 - acc: 0.5481
Epoch 523/1000
 - 1s - loss: 2.0182 - acc: 0.5479
Epoch 524/1000
 - 1s - loss: 2.0156 - acc: 0.5478
Epoch 525/1000
 - 1s - loss: 2.0124 - acc: 0.5503
Epoch 526/1000
 - 1s - loss: 2.0094 - acc: 0.5506
Epoch 527/1000
 - 1s - loss: 2.0068 - acc: 0.5499
Epoch 528/1000
 - 1s - loss: 2.0038 - acc: 0.5507
Epoch 529/1000
 - 1s - loss: 2.0007 - acc: 0.5514
Epoch 530/1000
 - 1s - loss: 1.9981 - acc: 0.5517
Epoch 531/1000
 - 1s - loss: 1.9954 - acc: 0.5527
Epoch 532/1000
 - 1s - loss: 1.9922 - acc: 0.5524
Epoch 533/1000
 - 1s - loss: 1.9896 - acc: 0.5540
Epoch 534/1000
 - 1s - loss: 1.9868 - acc: 0.5536
Epoch 535/1000
 - 1s - loss: 1.9839 - acc: 0.5554
Epoch 536/1000
 - 1s - loss: 1.9809 - acc: 0.5554
Epoch 537/1000
 - 1s - loss: 1.9783 - acc: 0.5550
Epoch 538/1000
 - 1s - loss: 1.9752 - acc: 0.5566
Epoch 539/1000
 - 1s - loss: 1.9723 - acc: 0.5563
Epoch 540/1000
 - 1s - loss: 1.9699 - acc: 0.5565
Epoch 541/1000
 - 1s - loss: 1.9669 - acc: 0.5585
Epoch 542/1000
 - 1s - loss: 1.9643 - acc: 0.5581
Epoch 543/1000
 - 1s - loss: 1.9614 - acc: 0.5589
Epoch 544/1000
 - 1s - loss: 1.9587 - acc: 0.5584
Epoch 545/1000
 - 1s - loss: 1.9557 - acc: 0.5604
Epoch 546/1000
 - 1s - loss: 1.9531 - acc: 0.5609
Epoch 547/1000
 - 1s - loss: 1.9506 - acc: 0.5606
Epoch 548/1000
 - 1s - loss: 1.9479 - acc: 0.5609
Epoch 549/1000
 - 1s - loss: 1.9447 - acc: 0.5611
Epoch 550/1000
 - 1s - loss: 1.9421 - acc: 0.5625
Epoch 551/1000
 - 1s - loss: 1.9394 - acc: 0.5631
Epoch 552/1000
 - 1s - loss: 1.9369 - acc: 0.5636
Epoch 553/1000
 - 1s - loss: 1.9342 - acc: 0.5647
Epoch 554/1000
 - 1s - loss: 1.9314 - acc: 0.5653
Epoch 555/1000
 - 1s - loss: 1.9285 - acc: 0.5645
Epoch 556/1000
 - 1s - loss: 1.9260 - acc: 0.5664
Epoch 557/1000
 - 1s - loss: 1.9234 - acc: 0.5663
Epoch 558/1000
 - 1s - loss: 1.9204 - acc: 0.5676
Epoch 559/1000
 - 1s - loss: 1.9176 - acc: 0.5678
Epoch 560/1000
 - 1s - loss: 1.9152 - acc: 0.5679
Epoch 561/1000
 - 1s - loss: 1.9123 - acc: 0.5689
Epoch 562/1000
 - 1s - loss: 1.9099 - acc: 0.5700
Epoch 563/1000
 - 1s - loss: 1.9070 - acc: 0.5696
Epoch 564/1000
 - 1s - loss: 1.9048 - acc: 0.5705
Epoch 565/1000
 - 1s - loss: 1.9020 - acc: 0.5710
Epoch 566/1000
 - 1s - loss: 1.8991 - acc: 0.5716
Epoch 567/1000
 - 1s - loss: 1.8967 - acc: 0.5719
Epoch 568/1000
 - 1s - loss: 1.8940 - acc: 0.5736
Epoch 569/1000
 - 1s - loss: 1.8914 - acc: 0.5723
Epoch 570/1000
 - 1s - loss: 1.8891 - acc: 0.5733
Epoch 571/1000
 - 1s - loss: 1.8862 - acc: 0.5741
Epoch 572/1000
 - 1s - loss: 1.8833 - acc: 0.5741
Epoch 573/1000
 - 1s - loss: 1.8812 - acc: 0.5749
Epoch 574/1000
 - 1s - loss: 1.8784 - acc: 0.5748
Epoch 575/1000
 - 1s - loss: 1.8760 - acc: 0.5762
Epoch 576/1000
 - 1s - loss: 1.8736 - acc: 0.5764
Epoch 577/1000
 - 1s - loss: 1.8706 - acc: 0.5773
Epoch 578/1000
 - 1s - loss: 1.8681 - acc: 0.5770
Epoch 579/1000
 - 1s - loss: 1.8653 - acc: 0.5776
Epoch 580/1000
 - 1s - loss: 1.8633 - acc: 0.5784
Epoch 581/1000
 - 1s - loss: 1.8609 - acc: 0.5796
Epoch 582/1000
 - 1s - loss: 1.8579 - acc: 0.5789
Epoch 583/1000
 - 1s - loss: 1.8557 - acc: 0.5798
Epoch 584/1000
 - 1s - loss: 1.8530 - acc: 0.5799
Epoch 585/1000
 - 1s - loss: 1.8507 - acc: 0.5805
Epoch 586/1000
 - 1s - loss: 1.8479 - acc: 0.5812
Epoch 587/1000
 - 1s - loss: 1.8456 - acc: 0.5806
Epoch 588/1000
 - 1s - loss: 1.8430 - acc: 0.5813
Epoch 589/1000
 - 1s - loss: 1.8406 - acc: 0.5829
Epoch 590/1000
 - 1s - loss: 1.8377 - acc: 0.5832
Epoch 591/1000
 - 1s - loss: 1.8358 - acc: 0.5845
Epoch 592/1000
 - 1s - loss: 1.8333 - acc: 0.5838
Epoch 593/1000
 - 1s - loss: 1.8307 - acc: 0.5844
Epoch 594/1000
 - 1s - loss: 1.8281 - acc: 0.5853
Epoch 595/1000
 - 1s - loss: 1.8258 - acc: 0.5850
Epoch 596/1000
 - 1s - loss: 1.8233 - acc: 0.5861
Epoch 597/1000
 - 1s - loss: 1.8209 - acc: 0.5864
Epoch 598/1000
 - 1s - loss: 1.8185 - acc: 0.5867
Epoch 599/1000
 - 1s - loss: 1.8160 - acc: 0.5875
Epoch 600/1000
 - 1s - loss: 1.8135 - acc: 0.5871
Epoch 601/1000
 - 1s - loss: 1.8113 - acc: 0.5882
Epoch 602/1000
 - 1s - loss: 1.8087 - acc: 0.5884
Epoch 603/1000
 - 1s - loss: 1.8065 - acc: 0.5895
Epoch 604/1000
 - 1s - loss: 1.8039 - acc: 0.5893
Epoch 605/1000
 - 1s - loss: 1.8016 - acc: 0.5894
Epoch 606/1000
 - 1s - loss: 1.7995 - acc: 0.5897
Epoch 607/1000
 - 1s - loss: 1.7969 - acc: 0.5911
Epoch 608/1000
 - 1s - loss: 1.7941 - acc: 0.5905
Epoch 609/1000
 - 1s - loss: 1.7921 - acc: 0.5925
Epoch 610/1000
 - 1s - loss: 1.7901 - acc: 0.5921
Epoch 611/1000
 - 1s - loss: 1.7875 - acc: 0.5929
Epoch 612/1000
 - 1s - loss: 1.7851 - acc: 0.5929
Epoch 613/1000
 - 1s - loss: 1.7825 - acc: 0.5936
Epoch 614/1000
 - 1s - loss: 1.7803 - acc: 0.5943
Epoch 615/1000
 - 1s - loss: 1.7778 - acc: 0.5951
Epoch 616/1000
 - 1s - loss: 1.7760 - acc: 0.5952
Epoch 617/1000
 - 1s - loss: 1.7737 - acc: 0.5954
Epoch 618/1000
 - 1s - loss: 1.7710 - acc: 0.5970
Epoch 619/1000
 - 1s - loss: 1.7685 - acc: 0.5970
Epoch 620/1000
 - 1s - loss: 1.7662 - acc: 0.5980
Epoch 621/1000
 - 1s - loss: 1.7638 - acc: 0.5982
Epoch 622/1000
 - 1s - loss: 1.7618 - acc: 0.5971
Epoch 623/1000
 - 1s - loss: 1.7597 - acc: 0.5979
Epoch 624/1000
 - 1s - loss: 1.7575 - acc: 0.5998
Epoch 625/1000
 - 1s - loss: 1.7551 - acc: 0.5996
Epoch 626/1000
 - 1s - loss: 1.7525 - acc: 0.5998
Epoch 627/1000
 - 1s - loss: 1.7505 - acc: 0.6003
Epoch 628/1000
 - 1s - loss: 1.7482 - acc: 0.6007
Epoch 629/1000
 - 1s - loss: 1.7459 - acc: 0.6013
Epoch 630/1000
 - 1s - loss: 1.7436 - acc: 0.6024
Epoch 631/1000
 - 1s - loss: 1.7410 - acc: 0.6029
Epoch 632/1000
 - 1s - loss: 1.7389 - acc: 0.6032
Epoch 633/1000
 - 1s - loss: 1.7369 - acc: 0.6047
Epoch 634/1000
 - 1s - loss: 1.7348 - acc: 0.6032
Epoch 635/1000
 - 1s - loss: 1.7323 - acc: 0.6050
Epoch 636/1000
 - 1s - loss: 1.7300 - acc: 0.6041
Epoch 637/1000
 - 1s - loss: 1.7281 - acc: 0.6065
Epoch 638/1000
 - 1s - loss: 1.7260 - acc: 0.6062
Epoch 639/1000
 - 1s - loss: 1.7237 - acc: 0.6054
Epoch 640/1000
 - 1s - loss: 1.7210 - acc: 0.6072
Epoch 641/1000
 - 1s - loss: 1.7194 - acc: 0.6075
Epoch 642/1000
 - 1s - loss: 1.7171 - acc: 0.6087
Epoch 643/1000
 - 1s - loss: 1.7154 - acc: 0.6085
Epoch 644/1000
 - 1s - loss: 1.7124 - acc: 0.6089
Epoch 645/1000
 - 1s - loss: 1.7105 - acc: 0.6097
Epoch 646/1000
 - 1s - loss: 1.7084 - acc: 0.6091
Epoch 647/1000
 - 1s - loss: 1.7056 - acc: 0.6111
Epoch 648/1000
 - 1s - loss: 1.7042 - acc: 0.6108
Epoch 649/1000
 - 1s - loss: 1.7021 - acc: 0.6113
Epoch 650/1000
 - 1s - loss: 1.6997 - acc: 0.6109
Epoch 651/1000
 - 1s - loss: 1.6976 - acc: 0.6124
Epoch 652/1000
 - 1s - loss: 1.6955 - acc: 0.6120
Epoch 653/1000
 - 1s - loss: 1.6931 - acc: 0.6142
Epoch 654/1000
 - 1s - loss: 1.6910 - acc: 0.6141
Epoch 655/1000
 - 1s - loss: 1.6887 - acc: 0.6140
Epoch 656/1000
 - 1s - loss: 1.6870 - acc: 0.6144
Epoch 657/1000
 - 1s - loss: 1.6851 - acc: 0.6143
Epoch 658/1000
 - 1s - loss: 1.6828 - acc: 0.6155
Epoch 659/1000
 - 1s - loss: 1.6808 - acc: 0.6164
Epoch 660/1000
 - 1s - loss: 1.6788 - acc: 0.6166
Epoch 661/1000
 - 1s - loss: 1.6763 - acc: 0.6179
Epoch 662/1000
 - 1s - loss: 1.6747 - acc: 0.6173
Epoch 663/1000
 - 1s - loss: 1.6722 - acc: 0.6177
Epoch 664/1000
 - 1s - loss: 1.6701 - acc: 0.6186
Epoch 665/1000
 - 1s - loss: 1.6681 - acc: 0.6196
Epoch 666/1000
 - 1s - loss: 1.6658 - acc: 0.6172
Epoch 667/1000
 - 1s - loss: 1.6639 - acc: 0.6196
Epoch 668/1000
 - 1s - loss: 1.6621 - acc: 0.6204
Epoch 669/1000
 - 1s - loss: 1.6604 - acc: 0.6205
Epoch 670/1000
 - 1s - loss: 1.6579 - acc: 0.6215
Epoch 671/1000
 - 1s - loss: 1.6559 - acc: 0.6213
Epoch 672/1000
 - 1s - loss: 1.6534 - acc: 0.6225
Epoch 673/1000
 - 1s - loss: 1.6519 - acc: 0.6226
Epoch 674/1000
 - 1s - loss: 1.6496 - acc: 0.6238
Epoch 675/1000
 - 1s - loss: 1.6475 - acc: 0.6226
Epoch 676/1000
 - 1s - loss: 1.6460 - acc: 0.6234
Epoch 677/1000
 - 1s - loss: 1.6438 - acc: 0.6240
Epoch 678/1000
 - 1s - loss: 1.6417 - acc: 0.6255
Epoch 679/1000
 - 1s - loss: 1.6400 - acc: 0.6246
Epoch 680/1000
 - 1s - loss: 1.6374 - acc: 0.6256
Epoch 681/1000
 - 1s - loss: 1.6357 - acc: 0.6256
Epoch 682/1000
 - 1s - loss: 1.6338 - acc: 0.6256
Epoch 683/1000
 - 1s - loss: 1.6316 - acc: 0.6276
Epoch 684/1000
 - 1s - loss: 1.6297 - acc: 0.6264
Epoch 685/1000
 - 1s - loss: 1.6277 - acc: 0.6276
Epoch 686/1000
 - 1s - loss: 1.6260 - acc: 0.6292
Epoch 687/1000
 - 1s - loss: 1.6241 - acc: 0.6285
Epoch 688/1000
 - 1s - loss: 1.6220 - acc: 0.6282
Epoch 689/1000
 - 1s - loss: 1.6199 - acc: 0.6289
Epoch 690/1000
 - 1s - loss: 1.6178 - acc: 0.6297
Epoch 691/1000
 - 1s - loss: 1.6159 - acc: 0.6305
Epoch 692/1000
 - 1s - loss: 1.6145 - acc: 0.6304
Epoch 693/1000
 - 1s - loss: 1.6123 - acc: 0.6309
Epoch 694/1000
 - 1s - loss: 1.6102 - acc: 0.6309
Epoch 695/1000
 - 1s - loss: 1.6082 - acc: 0.6324
Epoch 696/1000
 - 1s - loss: 1.6065 - acc: 0.6331
Epoch 697/1000
 - 1s - loss: 1.6044 - acc: 0.6317
Epoch 698/1000
 - 1s - loss: 1.6028 - acc: 0.6326
Epoch 699/1000
 - 1s - loss: 1.6008 - acc: 0.6336
Epoch 700/1000
 - 1s - loss: 1.5990 - acc: 0.6338
Epoch 701/1000
 - 1s - loss: 1.5969 - acc: 0.6345
Epoch 702/1000
 - 1s - loss: 1.5950 - acc: 0.6340
Epoch 703/1000
 - 1s - loss: 1.5931 - acc: 0.6358
Epoch 704/1000
 - 1s - loss: 1.5912 - acc: 0.6355
Epoch 705/1000
 - 1s - loss: 1.5896 - acc: 0.6363
Epoch 706/1000
 - 1s - loss: 1.5875 - acc: 0.6364
Epoch 707/1000
 - 1s - loss: 1.5855 - acc: 0.6371
Epoch 708/1000
 - 1s - loss: 1.5839 - acc: 0.6375
Epoch 709/1000
 - 1s - loss: 1.5820 - acc: 0.6366
Epoch 710/1000
 - 1s - loss: 1.5798 - acc: 0.6384
Epoch 711/1000
 - 1s - loss: 1.5780 - acc: 0.6382
Epoch 712/1000
 - 1s - loss: 1.5762 - acc: 0.6392
Epoch 713/1000
 - 1s - loss: 1.5745 - acc: 0.6392
Epoch 714/1000
 - 1s - loss: 1.5726 - acc: 0.6387
Epoch 715/1000
 - 1s - loss: 1.5709 - acc: 0.6400
Epoch 716/1000
 - 1s - loss: 1.5692 - acc: 0.6410
Epoch 717/1000
 - 1s - loss: 1.5670 - acc: 0.6410
Epoch 718/1000
 - 1s - loss: 1.5655 - acc: 0.6416
Epoch 719/1000
 - 1s - loss: 1.5633 - acc: 0.6424
Epoch 720/1000
 - 1s - loss: 1.5618 - acc: 0.6428
Epoch 721/1000
 - 1s - loss: 1.5597 - acc: 0.6420
Epoch 722/1000
 - 1s - loss: 1.5581 - acc: 0.6417
Epoch 723/1000
 - 1s - loss: 1.5564 - acc: 0.6419
Epoch 724/1000
 - 1s - loss: 1.5546 - acc: 0.6440
Epoch 725/1000
 - 1s - loss: 1.5529 - acc: 0.6441
Epoch 726/1000
 - 1s - loss: 1.5507 - acc: 0.6435
Epoch 727/1000
 - 1s - loss: 1.5494 - acc: 0.6432
Epoch 728/1000
 - 1s - loss: 1.5472 - acc: 0.6456
Epoch 729/1000
 - 1s - loss: 1.5456 - acc: 0.6456
Epoch 730/1000
 - 1s - loss: 1.5435 - acc: 0.6465
Epoch 731/1000
 - 1s - loss: 1.5423 - acc: 0.6466
Epoch 732/1000
 - 1s - loss: 1.5405 - acc: 0.6463
Epoch 733/1000
 - 1s - loss: 1.5383 - acc: 0.6472
Epoch 734/1000
 - 1s - loss: 1.5369 - acc: 0.6471
Epoch 735/1000
 - 1s - loss: 1.5351 - acc: 0.6470
Epoch 736/1000
 - 1s - loss: 1.5334 - acc: 0.6481
Epoch 737/1000
 - 1s - loss: 1.5313 - acc: 0.6486
Epoch 738/1000
 - 1s - loss: 1.5297 - acc: 0.6486
Epoch 739/1000
 - 1s - loss: 1.5280 - acc: 0.6489
Epoch 740/1000
 - 1s - loss: 1.5262 - acc: 0.6498
Epoch 741/1000
 - 1s - loss: 1.5244 - acc: 0.6498
Epoch 742/1000
 - 1s - loss: 1.5233 - acc: 0.6513
Epoch 743/1000
 - 1s - loss: 1.5213 - acc: 0.6508
Epoch 744/1000
 - 1s - loss: 1.5194 - acc: 0.6506
Epoch 745/1000
 - 1s - loss: 1.5175 - acc: 0.6512
Epoch 746/1000
 - 1s - loss: 1.5160 - acc: 0.6522
Epoch 747/1000
 - 1s - loss: 1.5144 - acc: 0.6525
Epoch 748/1000
 - 1s - loss: 1.5124 - acc: 0.6536
Epoch 749/1000
 - 1s - loss: 1.5110 - acc: 0.6535
Epoch 750/1000
 - 1s - loss: 1.5092 - acc: 0.6525
Epoch 751/1000
 - 1s - loss: 1.5077 - acc: 0.6539
Epoch 752/1000
 - 1s - loss: 1.5058 - acc: 0.6544
Epoch 753/1000
 - 1s - loss: 1.5042 - acc: 0.6550
Epoch 754/1000
 - 1s - loss: 1.5023 - acc: 0.6563
Epoch 755/1000
 - 1s - loss: 1.5011 - acc: 0.6555
Epoch 756/1000
 - 1s - loss: 1.4991 - acc: 0.6555
Epoch 757/1000
 - 1s - loss: 1.4975 - acc: 0.6573
Epoch 758/1000
 - 1s - loss: 1.4959 - acc: 0.6548
Epoch 759/1000
 - 1s - loss: 1.4939 - acc: 0.6561
Epoch 760/1000
 - 1s - loss: 1.4928 - acc: 0.6563
Epoch 761/1000
 - 1s - loss: 1.4908 - acc: 0.6580
Epoch 762/1000
 - 1s - loss: 1.4892 - acc: 0.6573
Epoch 763/1000
 - 1s - loss: 1.4877 - acc: 0.6579
Epoch 764/1000
 - 1s - loss: 1.4859 - acc: 0.6596
Epoch 765/1000
 - 1s - loss: 1.4843 - acc: 0.6590
Epoch 766/1000
 - 1s - loss: 1.4827 - acc: 0.6585
Epoch 767/1000
 - 1s - loss: 1.4813 - acc: 0.6611
Epoch 768/1000
 - 1s - loss: 1.4796 - acc: 0.6593
Epoch 769/1000
 - 1s - loss: 1.4778 - acc: 0.6591
Epoch 770/1000
 - 1s - loss: 1.4761 - acc: 0.6620
Epoch 771/1000
 - 1s - loss: 1.4749 - acc: 0.6607
Epoch 772/1000
 - 1s - loss: 1.4730 - acc: 0.6621
Epoch 773/1000
 - 1s - loss: 1.4714 - acc: 0.6614
Epoch 774/1000
 - 1s - loss: 1.4700 - acc: 0.6623
Epoch 775/1000
 - 1s - loss: 1.4685 - acc: 0.6621
Epoch 776/1000
 - 1s - loss: 1.4666 - acc: 0.6626
Epoch 777/1000
 - 1s - loss: 1.4652 - acc: 0.6627
Epoch 778/1000
 - 1s - loss: 1.4638 - acc: 0.6628
Epoch 779/1000
 - 1s - loss: 1.4618 - acc: 0.6620
Epoch 780/1000
 - 1s - loss: 1.4606 - acc: 0.6649
Epoch 781/1000
 - 1s - loss: 1.4586 - acc: 0.6641
Epoch 782/1000
 - 1s - loss: 1.4573 - acc: 0.6656
Epoch 783/1000
 - 1s - loss: 1.4556 - acc: 0.6639
Epoch 784/1000
 - 1s - loss: 1.4540 - acc: 0.6660
Epoch 785/1000
 - 1s - loss: 1.4527 - acc: 0.6667
Epoch 786/1000
 - 1s - loss: 1.4512 - acc: 0.6657
Epoch 787/1000
 - 1s - loss: 1.4495 - acc: 0.6662
Epoch 788/1000
 - 1s - loss: 1.4484 - acc: 0.6660
Epoch 789/1000
 - 1s - loss: 1.4465 - acc: 0.6676
Epoch 790/1000
 - 1s - loss: 1.4450 - acc: 0.6677
Epoch 791/1000
 - 1s - loss: 1.4433 - acc: 0.6673
Epoch 792/1000
 - 1s - loss: 1.4418 - acc: 0.6692
Epoch 793/1000
 - 1s - loss: 1.4404 - acc: 0.6678
Epoch 794/1000
 - 1s - loss: 1.4388 - acc: 0.6690
Epoch 795/1000
 - 1s - loss: 1.4371 - acc: 0.6699
Epoch 796/1000
 - 1s - loss: 1.4354 - acc: 0.6697
Epoch 797/1000
 - 1s - loss: 1.4342 - acc: 0.6711
Epoch 798/1000
 - 1s - loss: 1.4323 - acc: 0.6706
Epoch 799/1000
 - 1s - loss: 1.4316 - acc: 0.6699
Epoch 800/1000
 - 1s - loss: 1.4297 - acc: 0.6713
Epoch 801/1000
 - 1s - loss: 1.4283 - acc: 0.6715
Epoch 802/1000
 - 1s - loss: 1.4268 - acc: 0.6725
Epoch 803/1000
 - 1s - loss: 1.4255 - acc: 0.6713
Epoch 804/1000
 - 1s - loss: 1.4236 - acc: 0.6735
Epoch 805/1000
 - 1s - loss: 1.4224 - acc: 0.6727
Epoch 806/1000
 - 1s - loss: 1.4207 - acc: 0.6737
Epoch 807/1000
 - 1s - loss: 1.4196 - acc: 0.6738
Epoch 808/1000
 - 1s - loss: 1.4177 - acc: 0.6732
Epoch 809/1000
 - 1s - loss: 1.4166 - acc: 0.6734
Epoch 810/1000
 - 1s - loss: 1.4150 - acc: 0.6740
Epoch 811/1000
 - 1s - loss: 1.4135 - acc: 0.6743
Epoch 812/1000
 - 1s - loss: 1.4123 - acc: 0.6736
Epoch 813/1000
 - 1s - loss: 1.4105 - acc: 0.6748
Epoch 814/1000
 - 1s - loss: 1.4093 - acc: 0.6752
Epoch 815/1000
 - 1s - loss: 1.4074 - acc: 0.6743
Epoch 816/1000
 - 1s - loss: 1.4063 - acc: 0.6755
Epoch 817/1000
 - 1s - loss: 1.4051 - acc: 0.6767
Epoch 818/1000
 - 1s - loss: 1.4035 - acc: 0.6771
Epoch 819/1000
 - 1s - loss: 1.4017 - acc: 0.6770
Epoch 820/1000
 - 1s - loss: 1.4006 - acc: 0.6772
Epoch 821/1000
 - 1s - loss: 1.3993 - acc: 0.6780
Epoch 822/1000
 - 1s - loss: 1.3975 - acc: 0.6792
Epoch 823/1000
 - 1s - loss: 1.3965 - acc: 0.6782
Epoch 824/1000
 - 1s - loss: 1.3948 - acc: 0.6794
Epoch 825/1000
 - 1s - loss: 1.3933 - acc: 0.6793
Epoch 826/1000
 - 1s - loss: 1.3919 - acc: 0.6801
Epoch 827/1000
 - 1s - loss: 1.3907 - acc: 0.6792
Epoch 828/1000
 - 1s - loss: 1.3888 - acc: 0.6794
Epoch 829/1000
 - 1s - loss: 1.3874 - acc: 0.6800
Epoch 830/1000
 - 1s - loss: 1.3867 - acc: 0.6805
Epoch 831/1000
 - 1s - loss: 1.3846 - acc: 0.6810
Epoch 832/1000
 - 1s - loss: 1.3837 - acc: 0.6802
Epoch 833/1000
 - 1s - loss: 1.3825 - acc: 0.6810
Epoch 834/1000
 - 1s - loss: 1.3808 - acc: 0.6808
Epoch 835/1000
 - 1s - loss: 1.3793 - acc: 0.6816
Epoch 836/1000
 - 1s - loss: 1.3780 - acc: 0.6832
Epoch 837/1000
 - 1s - loss: 1.3765 - acc: 0.6830
Epoch 838/1000
 - 1s - loss: 1.3753 - acc: 0.6831
Epoch 839/1000
 - 1s - loss: 1.3737 - acc: 0.6839
Epoch 840/1000
 - 1s - loss: 1.3728 - acc: 0.6830
Epoch 841/1000
 - 1s - loss: 1.3713 - acc: 0.6835
Epoch 842/1000
 - 1s - loss: 1.3697 - acc: 0.6844
Epoch 843/1000
 - 1s - loss: 1.3685 - acc: 0.6842
Epoch 844/1000
 - 1s - loss: 1.3672 - acc: 0.6856
Epoch 845/1000
 - 1s - loss: 1.3658 - acc: 0.6860
Epoch 846/1000
 - 1s - loss: 1.3644 - acc: 0.6866
Epoch 847/1000
 - 1s - loss: 1.3631 - acc: 0.6857
Epoch 848/1000
 - 1s - loss: 1.3619 - acc: 0.6852
Epoch 849/1000
 - 1s - loss: 1.3601 - acc: 0.6867
Epoch 850/1000
 - 1s - loss: 1.3586 - acc: 0.6876
Epoch 851/1000
 - 1s - loss: 1.3577 - acc: 0.6864
Epoch 852/1000
 - 1s - loss: 1.3561 - acc: 0.6880
Epoch 853/1000
 - 1s - loss: 1.3552 - acc: 0.6877
Epoch 854/1000
 - 1s - loss: 1.3537 - acc: 0.6885
Epoch 855/1000
 - 1s - loss: 1.3526 - acc: 0.6886
Epoch 856/1000
 - 1s - loss: 1.3512 - acc: 0.6887
Epoch 857/1000
 - 1s - loss: 1.3495 - acc: 0.6888
Epoch 858/1000
 - 1s - loss: 1.3483 - acc: 0.6896
Epoch 859/1000
 - 1s - loss: 1.3469 - acc: 0.6895
Epoch 860/1000
 - 1s - loss: 1.3460 - acc: 0.6895
Epoch 861/1000
 - 1s - loss: 1.3444 - acc: 0.6912
Epoch 862/1000
 - 1s - loss: 1.3431 - acc: 0.6906
Epoch 863/1000
 - 1s - loss: 1.3419 - acc: 0.6907
Epoch 864/1000
 - 1s - loss: 1.3407 - acc: 0.6919
Epoch 865/1000
 - 1s - loss: 1.3395 - acc: 0.6919
Epoch 866/1000
 - 1s - loss: 1.3378 - acc: 0.6912
Epoch 867/1000
 - 1s - loss: 1.3368 - acc: 0.6926
Epoch 868/1000
 - 1s - loss: 1.3354 - acc: 0.6925
Epoch 869/1000
 - 1s - loss: 1.3345 - acc: 0.6932
Epoch 870/1000
 - 1s - loss: 1.3328 - acc: 0.6934
Epoch 871/1000
 - 1s - loss: 1.3317 - acc: 0.6945
Epoch 872/1000
 - 1s - loss: 1.3306 - acc: 0.6946
Epoch 873/1000
 - 1s - loss: 1.3293 - acc: 0.6953
Epoch 874/1000
 - 1s - loss: 1.3279 - acc: 0.6944
Epoch 875/1000
 - 1s - loss: 1.3269 - acc: 0.6952
Epoch 876/1000
 - 1s - loss: 1.3256 - acc: 0.6957
Epoch 877/1000
 - 1s - loss: 1.3242 - acc: 0.6951
Epoch 878/1000
 - 1s - loss: 1.3231 - acc: 0.6951
Epoch 879/1000
 - 1s - loss: 1.3216 - acc: 0.6962
Epoch 880/1000
 - 1s - loss: 1.3207 - acc: 0.6966
Epoch 881/1000
 - 1s - loss: 1.3192 - acc: 0.6966
Epoch 882/1000
 - 1s - loss: 1.3180 - acc: 0.6963
Epoch 883/1000
 - 1s - loss: 1.3169 - acc: 0.6968
Epoch 884/1000
 - 1s - loss: 1.3154 - acc: 0.6976
Epoch 885/1000
 - 1s - loss: 1.3140 - acc: 0.6975
Epoch 886/1000
 - 1s - loss: 1.3131 - acc: 0.6991
Epoch 887/1000
 - 1s - loss: 1.3115 - acc: 0.6985
Epoch 888/1000
 - 1s - loss: 1.3108 - acc: 0.6989
Epoch 889/1000
 - 1s - loss: 1.3092 - acc: 0.6983
Epoch 890/1000
 - 1s - loss: 1.3081 - acc: 0.6985
Epoch 891/1000
 - 1s - loss: 1.3070 - acc: 0.6996
Epoch 892/1000
 - 1s - loss: 1.3055 - acc: 0.6993
Epoch 893/1000
 - 1s - loss: 1.3045 - acc: 0.7007
Epoch 894/1000
 - 1s - loss: 1.3032 - acc: 0.7000
Epoch 895/1000
 - 1s - loss: 1.3020 - acc: 0.7010
Epoch 896/1000
 - 1s - loss: 1.3007 - acc: 0.7012
Epoch 897/1000
 - 1s - loss: 1.2997 - acc: 0.7006
Epoch 898/1000
 - 1s - loss: 1.2984 - acc: 0.7022
Epoch 899/1000
 - 1s - loss: 1.2976 - acc: 0.7015
Epoch 900/1000
 - 1s - loss: 1.2962 - acc: 0.7025
Epoch 901/1000
 - 1s - loss: 1.2949 - acc: 0.7005
Epoch 902/1000
 - 1s - loss: 1.2935 - acc: 0.7039
Epoch 903/1000
 - 1s - loss: 1.2926 - acc: 0.7027
Epoch 904/1000
 - 1s - loss: 1.2908 - acc: 0.7039
Epoch 905/1000
 - 1s - loss: 1.2901 - acc: 0.7019
Epoch 906/1000
 - 1s - loss: 1.2890 - acc: 0.7038
Epoch 907/1000
 - 1s - loss: 1.2879 - acc: 0.7038
Epoch 908/1000
 - 1s - loss: 1.2866 - acc: 0.7041
Epoch 909/1000
 - 1s - loss: 1.2855 - acc: 0.7042
Epoch 910/1000
 - 1s - loss: 1.2848 - acc: 0.7036
Epoch 911/1000
 - 1s - loss: 1.2830 - acc: 0.7056
Epoch 912/1000
 - 1s - loss: 1.2821 - acc: 0.7062
Epoch 913/1000
 - 1s - loss: 1.2811 - acc: 0.7053
Epoch 914/1000
 - 1s - loss: 1.2793 - acc: 0.7068
Epoch 915/1000
 - 1s - loss: 1.2784 - acc: 0.7055
Epoch 916/1000
 - 1s - loss: 1.2775 - acc: 0.7068
Epoch 917/1000
 - 1s - loss: 1.2760 - acc: 0.7066
Epoch 918/1000
 - 1s - loss: 1.2750 - acc: 0.7064
Epoch 919/1000
 - 1s - loss: 1.2741 - acc: 0.7057
Epoch 920/1000
 - 1s - loss: 1.2729 - acc: 0.7072
Epoch 921/1000
 - 1s - loss: 1.2716 - acc: 0.7071
Epoch 922/1000
 - 1s - loss: 1.2708 - acc: 0.7073
Epoch 923/1000
 - 1s - loss: 1.2692 - acc: 0.7079
Epoch 924/1000
 - 1s - loss: 1.2683 - acc: 0.7094
Epoch 925/1000
 - 1s - loss: 1.2672 - acc: 0.7081
Epoch 926/1000
 - 1s - loss: 1.2661 - acc: 0.7086
Epoch 927/1000
 - 1s - loss: 1.2648 - acc: 0.7087
Epoch 928/1000
 - 1s - loss: 1.2639 - acc: 0.7080
Epoch 929/1000
 - 1s - loss: 1.2626 - acc: 0.7098
Epoch 930/1000
 - 1s - loss: 1.2616 - acc: 0.7097
Epoch 931/1000
 - 1s - loss: 1.2599 - acc: 0.7102
Epoch 932/1000
 - 1s - loss: 1.2592 - acc: 0.7096
Epoch 933/1000
 - 1s - loss: 1.2584 - acc: 0.7098
Epoch 934/1000
 - 1s - loss: 1.2572 - acc: 0.7113
Epoch 935/1000
 - 1s - loss: 1.2561 - acc: 0.7109
Epoch 936/1000
 - 1s - loss: 1.2552 - acc: 0.7116
Epoch 937/1000
 - 1s - loss: 1.2539 - acc: 0.7108
Epoch 938/1000
 - 1s - loss: 1.2527 - acc: 0.7114
Epoch 939/1000
 - 1s - loss: 1.2517 - acc: 0.7125
Epoch 940/1000
 - 1s - loss: 1.2506 - acc: 0.7119
Epoch 941/1000
 - 1s - loss: 1.2493 - acc: 0.7120
Epoch 942/1000
 - 1s - loss: 1.2483 - acc: 0.7131
Epoch 943/1000
 - 1s - loss: 1.2474 - acc: 0.7128
Epoch 944/1000
 - 1s - loss: 1.2462 - acc: 0.7136
Epoch 945/1000
 - 1s - loss: 1.2449 - acc: 0.7132
Epoch 946/1000
 - 1s - loss: 1.2442 - acc: 0.7142
Epoch 947/1000
 - 1s - loss: 1.2433 - acc: 0.7131
Epoch 948/1000
 - 1s - loss: 1.2422 - acc: 0.7141
Epoch 949/1000
 - 1s - loss: 1.2407 - acc: 0.7137
Epoch 950/1000
 - 1s - loss: 1.2401 - acc: 0.7146
Epoch 951/1000
 - 1s - loss: 1.2388 - acc: 0.7149
Epoch 952/1000
 - 1s - loss: 1.2377 - acc: 0.7143
Epoch 953/1000
 - 1s - loss: 1.2365 - acc: 0.7152
Epoch 954/1000
 - 1s - loss: 1.2357 - acc: 0.7160
Epoch 955/1000
 - 1s - loss: 1.2344 - acc: 0.7152
Epoch 956/1000
 - 1s - loss: 1.2334 - acc: 0.7169
Epoch 957/1000
 - 1s - loss: 1.2328 - acc: 0.7166
Epoch 958/1000
 - 1s - loss: 1.2315 - acc: 0.7159
Epoch 959/1000
 - 1s - loss: 1.2303 - acc: 0.7176
Epoch 960/1000
 - 1s - loss: 1.2294 - acc: 0.7161
Epoch 961/1000
 - 1s - loss: 1.2283 - acc: 0.7163
Epoch 962/1000
 - 1s - loss: 1.2273 - acc: 0.7189
Epoch 963/1000
 - 1s - loss: 1.2263 - acc: 0.7175
Epoch 964/1000
 - 1s - loss: 1.2251 - acc: 0.7186
Epoch 965/1000
 - 1s - loss: 1.2239 - acc: 0.7181
Epoch 966/1000
 - 1s - loss: 1.2231 - acc: 0.7179
Epoch 967/1000
 - 1s - loss: 1.2219 - acc: 0.7190
Epoch 968/1000
 - 1s - loss: 1.2213 - acc: 0.7188
Epoch 969/1000
 - 1s - loss: 1.2200 - acc: 0.7193
Epoch 970/1000
 - 1s - loss: 1.2190 - acc: 0.7205
Epoch 971/1000
 - 1s - loss: 1.2182 - acc: 0.7201
Epoch 972/1000
 - 1s - loss: 1.2170 - acc: 0.7214
Epoch 973/1000
 - 1s - loss: 1.2163 - acc: 0.7193
Epoch 974/1000
 - 1s - loss: 1.2150 - acc: 0.7202
Epoch 975/1000
 - 1s - loss: 1.2141 - acc: 0.7210
Epoch 976/1000
 - 1s - loss: 1.2129 - acc: 0.7217
Epoch 977/1000
 - 1s - loss: 1.2122 - acc: 0.7214
Epoch 978/1000
 - 1s - loss: 1.2112 - acc: 0.7210
Epoch 979/1000
 - 1s - loss: 1.2100 - acc: 0.7210
Epoch 980/1000
 - 1s - loss: 1.2090 - acc: 0.7225
Epoch 981/1000
 - 1s - loss: 1.2082 - acc: 0.7224
Epoch 982/1000
 - 1s - loss: 1.2071 - acc: 0.7207
Epoch 983/1000
 - 1s - loss: 1.2063 - acc: 0.7220
Epoch 984/1000
 - 1s - loss: 1.2051 - acc: 0.7228
Epoch 985/1000
 - 1s - loss: 1.2043 - acc: 0.7232
Epoch 986/1000
 - 1s - loss: 1.2030 - acc: 0.7225
Epoch 987/1000
 - 1s - loss: 1.2024 - acc: 0.7247
Epoch 988/1000
 - 1s - loss: 1.2015 - acc: 0.7235
Epoch 989/1000
 - 1s - loss: 1.2004 - acc: 0.7236
Epoch 990/1000
 - 1s - loss: 1.1991 - acc: 0.7240
Epoch 991/1000
 - 1s - loss: 1.1983 - acc: 0.7237
Epoch 992/1000
 - 1s - loss: 1.1975 - acc: 0.7246
Epoch 993/1000
 - 1s - loss: 1.1965 - acc: 0.7248
Epoch 994/1000
 - 1s - loss: 1.1957 - acc: 0.7245
Epoch 995/1000
 - 1s - loss: 1.1945 - acc: 0.7260
Epoch 996/1000
 - 1s - loss: 1.1935 - acc: 0.7256
Epoch 997/1000
 - 1s - loss: 1.1928 - acc: 0.7259
Epoch 998/1000
 - 1s - loss: 1.1913 - acc: 0.7263
Epoch 999/1000
 - 1s - loss: 1.1905 - acc: 0.7253
Epoch 1000/1000
 - 1s - loss: 1.1897 - acc: 0.7265
CPU times: user 16min 28s, sys: 2min 22s, total: 18min 50s
Wall time: 13min 29s
In:
plt.plot(hist.history['acc'])
plt.show()
/home/ubuntu/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/matplotlib/font_manager.py:1328: UserWarning: findfont: Font family ['nanumgothic'] not found. Falling back to DejaVu Sans
  (prop.get_family(), self.defaultFamily[fontext]))

Word2Vec

In:
vectors = cbow.get_weights()[0]
In:
f = open('cbow_vectors.txt' ,'w')
f.write('{} {}\n'.format(V-1, dim))
for word, i in tokenizer.word_index.items():
    str_vec = ' '.join(map(str, list(vectors[i, :])))
    f.write('{} {}\n'.format(word, str_vec))
f.close()
In:
word2vec = gensim.models.KeyedVectors.load_word2vec_format('./cbow_vectors.txt', binary=False)
In:
word2vec.most_similar('rabbit')
Out:
[('hatter', 0.47093451023101807),
 ('queen', 0.4295445382595062),
 ('caterpillar', 0.42325568199157715),
 ('king', 0.4147602915763855),
 ('lory', 0.4050913453102112),
 ('yet', 0.38523104786872864),
 ('gryphon', 0.3771767020225525),
 ('dormouse', 0.3750528395175934),
 ('alice', 0.3663620054721832),
 ('rat', 0.3617069125175476)]
In:
word2vec.most_similar('queen')
Out:
[('rabbit', 0.4295445382595062),
 ('pigeon', 0.42947056889533997),
 ('king', 0.4093449115753174),
 ('one', 0.40173566341400146),
 ('caterpillar', 0.3969307541847229),
 ('gryphon', 0.3968861997127533),
 ('grass', 0.3665374219417572),
 ('hatter', 0.3525356948375702),
 ('roof', 0.34467756748199463),
 ('hare', 0.34423381090164185)]
In:
 

질문/덧글

아직 질문이나 덧글이 없습니다. 첫번째 글을 남겨주세요!