model.ipynb 111 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/user/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/librosa/util/decorators.py:9: NumbaDeprecationWarning: An import was requested from a module that has moved location.\n",
      "Import requested from: 'numba.decorators', please update to use 'numba.core.decorators' or pin to Numba version 0.48.0. This alias will not be present in Numba version 0.50.0.\n",
      "  from numba.decorators import jit as optional_jit\n",
      "/Users/user/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/librosa/util/decorators.py:9: NumbaDeprecationWarning: An import was requested from a module that has moved location.\n",
      "Import of 'jit' requested from: 'numba.decorators', please update to use 'numba.core.decorators' or pin to Numba version 0.48.0. This alias will not be present in Numba version 0.50.0.\n",
      "  from numba.decorators import jit as optional_jit\n"
     ]
    }
   ],
   "source": [
    "from utils import *\n",
    "import numpy as np\n",
    "import warnings\n",
    "from sklearn.preprocessing import OneHotEncoder"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "warnings.filterwarnings(action='ignore') "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "PROJECT_DIR = get_upper_dir()\n",
    "DATA_DIR = get_data_dir(PROJECT_DIR)\n",
    "FEATURE_DIR = get_feature_dir(PROJECT_DIR)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "gender_labels_np = np.load(FEATURE_DIR + 'gender_age/label2.npy')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 119,
   "metadata": {},
   "outputs": [],
   "source": [
    "labels_np = np.load(FEATURE_DIR + 'direction/' + 'label2.npy')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {},
   "outputs": [],
   "source": [
    "enc = OneHotEncoder()\n",
    "enc.fit(labels_np.reshape(-1, 1))\n",
    "labels = enc.transform(labels_np.reshape(-1,1)).toarray()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "gender_enc = OneHotEncoder()\n",
    "gender_enc.fit(gender_labels_np.reshape(-1, 1))\n",
    "gender_labels = gender_enc.transform(gender_labels_np.reshape(-1,1)).toarray()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 121,
   "metadata": {},
   "outputs": [],
   "source": [
    "features = np.load(FEATURE_DIR + 'direction/feature2.npy')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "gender_features = np.load(FEATURE_DIR + 'gender_age/feature2.npy')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 154,
   "metadata": {},
   "outputs": [],
   "source": [
    "from tensorflow.keras import backend\n",
    "from tensorflow.keras.models import Sequential, Model\n",
    "from tensorflow.keras.layers import LeakyReLU, Input, Softmax, Conv2D, MaxPooling2D, Activation, Flatten, Dense, Dropout, Concatenate\n",
    "from tensorflow.keras.optimizers import SGD, RMSprop, Adam\n",
    "import tensorflow as tf\n",
    "\n",
    "from sklearn.model_selection import KFold\n",
    "\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "from random import shuffle"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "def shuffle_data(xFeed, yFeed):\n",
    "    # 셔플\n",
    "    xFeed_shuf = []\n",
    "    yFeed_shuf = []\n",
    "    index_shuf = list(range(len(xFeed)))\n",
    "    shuffle(index_shuf)\n",
    "    # one more shuffle\n",
    "    shuffle(index_shuf)\n",
    "    for i in index_shuf:\n",
    "        xFeed_shuf.append(xFeed[i])\n",
    "        yFeed_shuf.append(yFeed[i])\n",
    "    return xFeed_shuf, yFeed_shuf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "gender_features, gender_labels = shuffle_data(gender_features, gender_labels)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "train_data = gender_features[:2880]\n",
    "train_label = gender_labels[:2880]\n",
    "test_data = gender_features[2880:]\n",
    "test_label = gender_labels[2880:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 122,
   "metadata": {},
   "outputs": [],
   "source": [
    "train_data = features[:1440]\n",
    "train_label = labels[:1440]\n",
    "test_data = features[1440:]\n",
    "test_label = labels[1440:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 156,
   "metadata": {},
   "outputs": [],
   "source": [
    "input = Input(shape = (120, 150, 1))\n",
    "\n",
    "lrelu = LeakyReLU(alpha=0.1)\n",
    "x = Conv2D(32, kernel_size=5, activation=lrelu)(input)\n",
    "\n",
    "\n",
    "s1 = Conv2D(50, kernel_size=3, activation='relu')(x)\n",
    "s1 = MaxPooling2D(pool_size = (3,3), strides=(2,2))(s1)\n",
    "s2 = Conv2D(50, kernel_size=1, activation='relu')(x)\n",
    "s2 = MaxPooling2D(pool_size = (5,5), strides=(2,2))(s2)\n",
    "s3 = Conv2D(50, kernel_size=5, activation='relu')(x)\n",
    "s3 = MaxPooling2D(pool_size = (1,1), strides=(2,2))(s3)\n",
    "s_output = tf.concat([s1, s2, s3], 1)\n",
    "\n",
    "x = Conv2D(32, kernel_size=1, activation=lrelu)(s_output)\n",
    "x = MaxPooling2D(pool_size = (5,5), strides=(2,2))(x)\n",
    "x = Conv2D(32, kernel_size =5, activation=lrelu)(x)\n",
    "x = MaxPooling2D(pool_size = (1,1), strides=(2,2))(x)\n",
    "x = Flatten()(x)\n",
    "x = Dropout(0.5)(x)\n",
    "x = Dense(500)(x)\n",
    "x = lrelu(x)\n",
    "x = Dropout(0.25)(x)\n",
    "x = Dense(6)(x)\n",
    "y = Softmax()(x)\n",
    "model = Model(inputs=input, outputs=y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 157,
   "metadata": {},
   "outputs": [],
   "source": [
    "model.compile(loss = \"categorical_crossentropy\", optimizer=Adam(), metrics=[\"accuracy\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "metadata": {},
   "outputs": [],
   "source": [
    "train_data = np.array(train_data)\n",
    "test_data = np.array(test_data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 124,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1440, 120, 150, 1)"
      ]
     },
     "execution_count": 124,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train_data = np.array(train_data)\n",
    "train_data = train_data[:, :, :,np.newaxis,]\n",
    "test_data = np.array(test_data)\n",
    "test_data = test_data[:, :, :,np.newaxis,]\n",
    "train_data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 160,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Train on 1152 samples, validate on 288 samples\n",
      "Epoch 1/70\n",
      "  32/1152 [..............................] - ETA: 1:44"
     ]
    },
    {
     "ename": "AbortedError",
     "evalue": " Operation received an exception:Status: 5, message: could not create a view primitive descriptor, in file tensorflow/core/kernels/mkl_slice_op.cc:433\n\t [[node Slice_1 (defined at /Users/user/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py:1751) ]] [Op:__inference_distributed_function_18668]\n\nFunction call stack:\ndistributed_function\n",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mAbortedError\u001b[0m                              Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-160-5f5c167b4de7>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[0mtf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconfig\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexperimental\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_visible_devices\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'GPU'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mhistory\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtrain_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtrain_label\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbatch_size\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m32\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mepochs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m70\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvalidation_split\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0.2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m~/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py\u001b[0m in \u001b[0;36mfit\u001b[0;34m(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs)\u001b[0m\n\u001b[1;32m    726\u001b[0m         \u001b[0mmax_queue_size\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mmax_queue_size\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    727\u001b[0m         \u001b[0mworkers\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mworkers\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 728\u001b[0;31m         use_multiprocessing=use_multiprocessing)\n\u001b[0m\u001b[1;32m    729\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    730\u001b[0m   def evaluate(self,\n",
      "\u001b[0;32m~/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py\u001b[0m in \u001b[0;36mfit\u001b[0;34m(self, model, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, **kwargs)\u001b[0m\n\u001b[1;32m    322\u001b[0m                 \u001b[0mmode\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mModeKeys\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mTRAIN\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    323\u001b[0m                 \u001b[0mtraining_context\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mtraining_context\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 324\u001b[0;31m                 total_epochs=epochs)\n\u001b[0m\u001b[1;32m    325\u001b[0m             \u001b[0mcbks\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmake_logs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mepoch_logs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtraining_result\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mModeKeys\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mTRAIN\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    326\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py\u001b[0m in \u001b[0;36mrun_one_epoch\u001b[0;34m(model, iterator, execution_function, dataset_size, batch_size, strategy, steps_per_epoch, num_samples, mode, training_context, total_epochs)\u001b[0m\n\u001b[1;32m    121\u001b[0m         step=step, mode=mode, size=current_batch_size) as batch_logs:\n\u001b[1;32m    122\u001b[0m       \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 123\u001b[0;31m         \u001b[0mbatch_outs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mexecution_function\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0miterator\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    124\u001b[0m       \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mStopIteration\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mOutOfRangeError\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    125\u001b[0m         \u001b[0;31m# TODO(kaftan): File bug about tf function and errors.OutOfRangeError?\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py\u001b[0m in \u001b[0;36mexecution_function\u001b[0;34m(input_fn)\u001b[0m\n\u001b[1;32m     84\u001b[0m     \u001b[0;31m# `numpy` translates Tensors to values in Eager mode.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     85\u001b[0m     return nest.map_structure(_non_none_constant_value,\n\u001b[0;32m---> 86\u001b[0;31m                               distributed_function(input_fn))\n\u001b[0m\u001b[1;32m     87\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     88\u001b[0m   \u001b[0;32mreturn\u001b[0m \u001b[0mexecution_function\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, *args, **kwds)\u001b[0m\n\u001b[1;32m    455\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    456\u001b[0m     \u001b[0mtracing_count\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_tracing_count\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 457\u001b[0;31m     \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    458\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mtracing_count\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_tracing_count\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    459\u001b[0m       \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_counter\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcalled_without_tracing\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py\u001b[0m in \u001b[0;36m_call\u001b[0;34m(self, *args, **kwds)\u001b[0m\n\u001b[1;32m    485\u001b[0m       \u001b[0;31m# In this case we have created variables on the first call, so we run the\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    486\u001b[0m       \u001b[0;31m# defunned version which is guaranteed to never create variables.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 487\u001b[0;31m       \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_stateless_fn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m  \u001b[0;31m# pylint: disable=not-callable\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    488\u001b[0m     \u001b[0;32melif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_stateful_fn\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    489\u001b[0m       \u001b[0;31m# Release the lock early so that multiple threads can perform the call\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1821\u001b[0m     \u001b[0;34m\"\"\"Calls a graph function specialized to the inputs.\"\"\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1822\u001b[0m     \u001b[0mgraph_function\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_maybe_define_function\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1823\u001b[0;31m     \u001b[0;32mreturn\u001b[0m \u001b[0mgraph_function\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_filtered_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m  \u001b[0;31m# pylint: disable=protected-access\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1824\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1825\u001b[0m   \u001b[0;34m@\u001b[0m\u001b[0mproperty\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py\u001b[0m in \u001b[0;36m_filtered_call\u001b[0;34m(self, args, kwargs)\u001b[0m\n\u001b[1;32m   1139\u001b[0m          if isinstance(t, (ops.Tensor,\n\u001b[1;32m   1140\u001b[0m                            resource_variable_ops.BaseResourceVariable))),\n\u001b[0;32m-> 1141\u001b[0;31m         self.captured_inputs)\n\u001b[0m\u001b[1;32m   1142\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1143\u001b[0m   \u001b[0;32mdef\u001b[0m \u001b[0m_call_flat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcaptured_inputs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcancellation_manager\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mNone\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py\u001b[0m in \u001b[0;36m_call_flat\u001b[0;34m(self, args, captured_inputs, cancellation_manager)\u001b[0m\n\u001b[1;32m   1222\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mexecuting_eagerly\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1223\u001b[0m       flat_outputs = forward_function.call(\n\u001b[0;32m-> 1224\u001b[0;31m           ctx, args, cancellation_manager=cancellation_manager)\n\u001b[0m\u001b[1;32m   1225\u001b[0m     \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1226\u001b[0m       \u001b[0mgradient_name\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_delayed_rewrite_functions\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mregister\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py\u001b[0m in \u001b[0;36mcall\u001b[0;34m(self, ctx, args, cancellation_manager)\u001b[0m\n\u001b[1;32m    509\u001b[0m               \u001b[0minputs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    510\u001b[0m               \u001b[0mattrs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"executor_type\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexecutor_type\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"config_proto\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 511\u001b[0;31m               ctx=ctx)\n\u001b[0m\u001b[1;32m    512\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    513\u001b[0m           outputs = execute.execute_with_cancellation(\n",
      "\u001b[0;32m~/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/tensorflow_core/python/eager/execute.py\u001b[0m in \u001b[0;36mquick_execute\u001b[0;34m(op_name, num_outputs, inputs, attrs, ctx, name)\u001b[0m\n\u001b[1;32m     65\u001b[0m     \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     66\u001b[0m       \u001b[0mmessage\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmessage\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 67\u001b[0;31m     \u001b[0msix\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mraise_from\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcore\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_status_to_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcode\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmessage\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     68\u001b[0m   \u001b[0;32mexcept\u001b[0m \u001b[0mTypeError\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     69\u001b[0m     keras_symbolic_tensors = [\n",
      "\u001b[0;32m~/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/six.py\u001b[0m in \u001b[0;36mraise_from\u001b[0;34m(value, from_value)\u001b[0m\n",
      "\u001b[0;31mAbortedError\u001b[0m:  Operation received an exception:Status: 5, message: could not create a view primitive descriptor, in file tensorflow/core/kernels/mkl_slice_op.cc:433\n\t [[node Slice_1 (defined at /Users/user/opt/anaconda3/envs/capstone/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py:1751) ]] [Op:__inference_distributed_function_18668]\n\nFunction call stack:\ndistributed_function\n"
     ]
    }
   ],
   "source": [
    "history = model.fit(train_data, train_label, batch_size=32, epochs=70, verbose=1, validation_split=0.2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "44"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(train_data[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [],
   "source": [
    "class LeNet : \n",
    "    @staticmethod\n",
    "    def build(input_shape, classes):\n",
    "        model = Sequential()\n",
    "        model.add(Conv2D(32, kernel_size = 5, padding=\"same\", input_shape=input_shape))\n",
    "        model.add(Activation(\"relu\"))\n",
    "        model.add(MaxPooling2D(pool_size = (2,2), strides = (2,2)))\n",
    "        model.add(Conv2D(50, kernel_size = 5, padding=\"same\"))\n",
    "        model.add(Activation(\"relu\"))\n",
    "        model.add(Dropout(0.25))\n",
    "        model.add(MaxPooling2D(pool_size = (2,2), strides = (2,2)))\n",
    "        model.add(Flatten())\n",
    "        model.add(Dense(500))\n",
    "        model.add(Activation(\"relu\"))\n",
    "        model.add(Dropout(0.5))\n",
    "        model.add(Dense(6))\n",
    "        model.add(Activation(\"softmax\"))\n",
    "        return model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "train_data = np.array(train_data)\n",
    "train_data = train_data[:, :, :,np.newaxis,]\n",
    "test_data = np.array(test_data)\n",
    "test_data = test_data[:, :, :,np.newaxis,]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "train_label = np.array(train_label)\n",
    "test_label = np.array(test_label)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "model = LeNet.build(input_shape = (120, 150, 1), classes = 6)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "model.compile(loss = \"categorical_crossentropy\", optimizer=Adam(), metrics=[\"accuracy\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Train on 1152 samples, validate on 288 samples\n",
      "Epoch 1/70\n",
      "1152/1152 [==============================] - 76s 66ms/step - loss: 26.3207 - accuracy: 0.2778 - val_loss: 2.6237 - val_accuracy: 0.3715\n",
      "Epoch 2/70\n",
      "1152/1152 [==============================] - 68s 59ms/step - loss: 1.9331 - accuracy: 0.4010 - val_loss: 1.5722 - val_accuracy: 0.3160\n",
      "Epoch 3/70\n",
      "1152/1152 [==============================] - 67s 58ms/step - loss: 1.6432 - accuracy: 0.3733 - val_loss: 1.6544 - val_accuracy: 0.3368\n",
      "Epoch 4/70\n",
      "1152/1152 [==============================] - 65s 57ms/step - loss: 1.5273 - accuracy: 0.3620 - val_loss: 1.3009 - val_accuracy: 0.3090\n",
      "Epoch 5/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 1.2085 - accuracy: 0.4089 - val_loss: 0.9954 - val_accuracy: 0.5312\n",
      "Epoch 6/70\n",
      "1152/1152 [==============================] - 65s 56ms/step - loss: 0.8874 - accuracy: 0.6172 - val_loss: 0.7518 - val_accuracy: 0.6285\n",
      "Epoch 7/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.7188 - accuracy: 0.6528 - val_loss: 0.6511 - val_accuracy: 0.7014\n",
      "Epoch 8/70\n",
      "1152/1152 [==============================] - 64s 56ms/step - loss: 0.6054 - accuracy: 0.7057 - val_loss: 0.5796 - val_accuracy: 0.6944\n",
      "Epoch 9/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.5268 - accuracy: 0.7483 - val_loss: 0.5370 - val_accuracy: 0.6806\n",
      "Epoch 10/70\n",
      "1152/1152 [==============================] - 67s 58ms/step - loss: 0.4837 - accuracy: 0.7543 - val_loss: 0.5191 - val_accuracy: 0.7153\n",
      "Epoch 11/70\n",
      "1152/1152 [==============================] - 65s 57ms/step - loss: 0.4193 - accuracy: 0.8186 - val_loss: 0.5262 - val_accuracy: 0.7222\n",
      "Epoch 12/70\n",
      "1152/1152 [==============================] - 68s 59ms/step - loss: 0.3981 - accuracy: 0.8064 - val_loss: 0.4746 - val_accuracy: 0.7465\n",
      "Epoch 13/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.3433 - accuracy: 0.8446 - val_loss: 0.5689 - val_accuracy: 0.7292\n",
      "Epoch 14/70\n",
      "1152/1152 [==============================] - 64s 56ms/step - loss: 0.3732 - accuracy: 0.8351 - val_loss: 0.5609 - val_accuracy: 0.7292\n",
      "Epoch 15/70\n",
      "1152/1152 [==============================] - 63s 55ms/step - loss: 0.3778 - accuracy: 0.8299 - val_loss: 0.5052 - val_accuracy: 0.7188\n",
      "Epoch 16/70\n",
      "1152/1152 [==============================] - 65s 57ms/step - loss: 0.3161 - accuracy: 0.8759 - val_loss: 0.5213 - val_accuracy: 0.7361\n",
      "Epoch 17/70\n",
      "1152/1152 [==============================] - 65s 56ms/step - loss: 0.2801 - accuracy: 0.8924 - val_loss: 0.5327 - val_accuracy: 0.7257\n",
      "Epoch 18/70\n",
      "1152/1152 [==============================] - 67s 58ms/step - loss: 0.2342 - accuracy: 0.9097 - val_loss: 0.5138 - val_accuracy: 0.7326\n",
      "Epoch 19/70\n",
      "1152/1152 [==============================] - 65s 56ms/step - loss: 0.2188 - accuracy: 0.9141 - val_loss: 0.6925 - val_accuracy: 0.7535\n",
      "Epoch 20/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.2644 - accuracy: 0.8872 - val_loss: 0.6639 - val_accuracy: 0.7292\n",
      "Epoch 21/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.3089 - accuracy: 0.8646 - val_loss: 0.6406 - val_accuracy: 0.6875\n",
      "Epoch 22/70\n",
      "1152/1152 [==============================] - 63s 54ms/step - loss: 0.2923 - accuracy: 0.8724 - val_loss: 0.5364 - val_accuracy: 0.7153\n",
      "Epoch 23/70\n",
      "1152/1152 [==============================] - 65s 56ms/step - loss: 0.2567 - accuracy: 0.8950 - val_loss: 0.5579 - val_accuracy: 0.7188\n",
      "Epoch 24/70\n",
      "1152/1152 [==============================] - 66s 58ms/step - loss: 0.2031 - accuracy: 0.9280 - val_loss: 0.5855 - val_accuracy: 0.7292\n",
      "Epoch 25/70\n",
      "1152/1152 [==============================] - 67s 58ms/step - loss: 0.1902 - accuracy: 0.9358 - val_loss: 0.6121 - val_accuracy: 0.7222\n",
      "Epoch 26/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.2152 - accuracy: 0.9210 - val_loss: 0.5300 - val_accuracy: 0.7500\n",
      "Epoch 27/70\n",
      "1152/1152 [==============================] - 64s 55ms/step - loss: 0.1698 - accuracy: 0.9340 - val_loss: 0.5289 - val_accuracy: 0.7361\n",
      "Epoch 28/70\n",
      "1152/1152 [==============================] - 64s 56ms/step - loss: 0.1498 - accuracy: 0.9497 - val_loss: 0.5602 - val_accuracy: 0.7431\n",
      "Epoch 29/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.1306 - accuracy: 0.9635 - val_loss: 0.5966 - val_accuracy: 0.7639\n",
      "Epoch 30/70\n",
      "1152/1152 [==============================] - 68s 59ms/step - loss: 0.1147 - accuracy: 0.9679 - val_loss: 0.5639 - val_accuracy: 0.7569\n",
      "Epoch 31/70\n",
      "1152/1152 [==============================] - 69s 60ms/step - loss: 0.1266 - accuracy: 0.9601 - val_loss: 0.5917 - val_accuracy: 0.7569\n",
      "Epoch 32/70\n",
      "1152/1152 [==============================] - 70s 61ms/step - loss: 0.1084 - accuracy: 0.9705 - val_loss: 0.6421 - val_accuracy: 0.7604\n",
      "Epoch 33/70\n",
      "1152/1152 [==============================] - 69s 60ms/step - loss: 0.0929 - accuracy: 0.9835 - val_loss: 0.5928 - val_accuracy: 0.7604\n",
      "Epoch 34/70\n",
      "1152/1152 [==============================] - 65s 56ms/step - loss: 0.0932 - accuracy: 0.9688 - val_loss: 0.5696 - val_accuracy: 0.7604\n",
      "Epoch 35/70\n",
      "1152/1152 [==============================] - 64s 56ms/step - loss: 0.0751 - accuracy: 0.9861 - val_loss: 0.6220 - val_accuracy: 0.7431\n",
      "Epoch 36/70\n",
      "1152/1152 [==============================] - 63s 55ms/step - loss: 0.0827 - accuracy: 0.9748 - val_loss: 0.6349 - val_accuracy: 0.7431\n",
      "Epoch 37/70\n",
      "1152/1152 [==============================] - 65s 57ms/step - loss: 0.0816 - accuracy: 0.9774 - val_loss: 0.6071 - val_accuracy: 0.7431\n",
      "Epoch 38/70\n",
      "1152/1152 [==============================] - 64s 56ms/step - loss: 0.0792 - accuracy: 0.9818 - val_loss: 0.6312 - val_accuracy: 0.7500\n",
      "Epoch 39/70\n",
      "1152/1152 [==============================] - 63s 55ms/step - loss: 0.0679 - accuracy: 0.9818 - val_loss: 0.6937 - val_accuracy: 0.7326\n",
      "Epoch 40/70\n",
      "1152/1152 [==============================] - 65s 56ms/step - loss: 0.0636 - accuracy: 0.9896 - val_loss: 0.7020 - val_accuracy: 0.7569\n",
      "Epoch 41/70\n",
      "1152/1152 [==============================] - 67s 58ms/step - loss: 0.0721 - accuracy: 0.9792 - val_loss: 0.7188 - val_accuracy: 0.7569\n",
      "Epoch 42/70\n",
      "1152/1152 [==============================] - 65s 56ms/step - loss: 0.1014 - accuracy: 0.9670 - val_loss: 0.6657 - val_accuracy: 0.7569\n",
      "Epoch 43/70\n",
      "1152/1152 [==============================] - 65s 57ms/step - loss: 0.0953 - accuracy: 0.9705 - val_loss: 0.6586 - val_accuracy: 0.7153\n",
      "Epoch 44/70\n",
      "1152/1152 [==============================] - 67s 58ms/step - loss: 0.0810 - accuracy: 0.9783 - val_loss: 0.6399 - val_accuracy: 0.7361\n",
      "Epoch 45/70\n",
      "1152/1152 [==============================] - 65s 57ms/step - loss: 0.0799 - accuracy: 0.9748 - val_loss: 0.7105 - val_accuracy: 0.7326\n",
      "Epoch 46/70\n",
      "1152/1152 [==============================] - 65s 56ms/step - loss: 0.0625 - accuracy: 0.9852 - val_loss: 0.7111 - val_accuracy: 0.7014\n",
      "Epoch 47/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.0768 - accuracy: 0.9792 - val_loss: 0.6743 - val_accuracy: 0.7188\n",
      "Epoch 48/70\n",
      "1152/1152 [==============================] - 65s 56ms/step - loss: 0.0617 - accuracy: 0.9818 - val_loss: 0.7146 - val_accuracy: 0.7188\n",
      "Epoch 49/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.0606 - accuracy: 0.9800 - val_loss: 0.6055 - val_accuracy: 0.7396\n",
      "Epoch 50/70\n",
      "1152/1152 [==============================] - 65s 56ms/step - loss: 0.0583 - accuracy: 0.9861 - val_loss: 0.8499 - val_accuracy: 0.7465\n",
      "Epoch 51/70\n",
      "1152/1152 [==============================] - 62s 54ms/step - loss: 0.0781 - accuracy: 0.9731 - val_loss: 0.7414 - val_accuracy: 0.7188\n",
      "Epoch 52/70\n",
      "1152/1152 [==============================] - 65s 56ms/step - loss: 0.0673 - accuracy: 0.9783 - val_loss: 0.5846 - val_accuracy: 0.7396\n",
      "Epoch 53/70\n",
      "1152/1152 [==============================] - 65s 56ms/step - loss: 0.0516 - accuracy: 0.9922 - val_loss: 0.5961 - val_accuracy: 0.7361\n",
      "Epoch 54/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.0490 - accuracy: 0.9913 - val_loss: 0.6947 - val_accuracy: 0.7222\n",
      "Epoch 55/70\n",
      "1152/1152 [==============================] - 64s 56ms/step - loss: 0.0409 - accuracy: 0.9887 - val_loss: 0.7155 - val_accuracy: 0.7465\n",
      "Epoch 56/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.0299 - accuracy: 0.9948 - val_loss: 0.7342 - val_accuracy: 0.7326\n",
      "Epoch 57/70\n",
      "1152/1152 [==============================] - 65s 57ms/step - loss: 0.0316 - accuracy: 0.9913 - val_loss: 0.7678 - val_accuracy: 0.7465\n",
      "Epoch 58/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.0286 - accuracy: 0.9931 - val_loss: 0.7472 - val_accuracy: 0.7882\n",
      "Epoch 59/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.0205 - accuracy: 0.9983 - val_loss: 0.7065 - val_accuracy: 0.7465\n",
      "Epoch 60/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.0227 - accuracy: 0.9948 - val_loss: 0.7320 - val_accuracy: 0.7535\n",
      "Epoch 61/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.0353 - accuracy: 0.9939 - val_loss: 0.7004 - val_accuracy: 0.7465\n",
      "Epoch 62/70\n",
      "1152/1152 [==============================] - 68s 59ms/step - loss: 0.0285 - accuracy: 0.9931 - val_loss: 0.7706 - val_accuracy: 0.7535\n",
      "Epoch 63/70\n",
      "1152/1152 [==============================] - 67s 58ms/step - loss: 0.0264 - accuracy: 0.9965 - val_loss: 0.7434 - val_accuracy: 0.7500\n",
      "Epoch 64/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.0225 - accuracy: 0.9965 - val_loss: 0.8080 - val_accuracy: 0.7326\n",
      "Epoch 65/70\n",
      "1152/1152 [==============================] - 65s 56ms/step - loss: 0.0184 - accuracy: 0.9983 - val_loss: 0.8014 - val_accuracy: 0.7465\n",
      "Epoch 66/70\n",
      "1152/1152 [==============================] - 67s 58ms/step - loss: 0.0326 - accuracy: 0.9931 - val_loss: 0.7636 - val_accuracy: 0.7396\n",
      "Epoch 67/70\n",
      "1152/1152 [==============================] - 67s 58ms/step - loss: 0.0372 - accuracy: 0.9939 - val_loss: 0.8705 - val_accuracy: 0.7014\n",
      "Epoch 68/70\n",
      "1152/1152 [==============================] - 68s 59ms/step - loss: 0.0382 - accuracy: 0.9870 - val_loss: 0.7063 - val_accuracy: 0.7674\n",
      "Epoch 69/70\n",
      "1152/1152 [==============================] - 66s 58ms/step - loss: 0.0363 - accuracy: 0.9922 - val_loss: 0.7220 - val_accuracy: 0.7292\n",
      "Epoch 70/70\n",
      "1152/1152 [==============================] - 67s 59ms/step - loss: 0.0287 - accuracy: 0.9974 - val_loss: 0.9303 - val_accuracy: 0.7431\n"
     ]
    }
   ],
   "source": [
    "history = model.fit(train_data, train_label, batch_size=256, epochs=70, verbose=1, validation_split=0.2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "360/360 [==============================] - 7s 20ms/step\n",
      "최종 정확도 : 73.88888597488403 %\n"
     ]
    }
   ],
   "source": [
    "score = model.evaluate(test_data, test_label, verbose=1)\n",
    "print(\"최종 정확도 : \" + str( score[1] * 100 ) + \" %\" )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "360/360 [==============================] - 7s 20ms/step\n",
      "최종 정확도 : 78.88888716697693 %\n"
     ]
    }
   ],
   "source": [
    "score = model.evaluate(test_data, test_label, verbose=1)\n",
    "print(\"최종 정확도 : \" + str( score[1] * 100 ) + \" %\" )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1a2e425b50>]"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3de3iU9Zn/8fdNIETOIAEkBIgYBEQEGdF6qicQqxVorYLW1a4tbddDu7rd1R5/xe5ut7/a1t0La63Lr24rYquCsbqeq7VaIYEgSBAIIEkIkECAcMr5/v2RwQ4hkIFM8szh87quuchzSu4Z4DNP7u8zz9fcHRERSV5dgi5AREQ6loJeRCTJKehFRJKcgl5EJMkp6EVEklzXoAtoaeDAgT5y5MigyxARSSjLly/f6e6ZrW2Lu6AfOXIkBQUFQZchIpJQzGzLsbapdSMikuQU9CIiSU5BLyKS5BT0IiJJTkEvIpLkFPQiIkkuqqA3s+lmts7Mis3s/la2/9zMVoYf681sT8S228xsQ/hxWyyLFxGRtrV5Hb2ZpQHzgalAGZBvZnnuXnR4H3f/x4j97wYmhb8eAPwACAEOLA8fuzumz0JEJIEdqG3g5Q+3U9vQxM3nD4/594/mA1NTgGJ33wRgZouAGUDRMfafQ3O4A1wNvObuVeFjXwOmA0+1p2gRkUTX0NjEX4p3srhwK6+u2cGh+kYmDe8XWNBnAaURy2XA+a3taGYjgBzgzeMcm9XKcXOBuQDDh8f+SYqIxA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4OuJWhm1s/MnjGzj8L/Rj4VdE1BMrN/DP8/+dDMnjKzjKBrirWkCPooJ0dJJQ3Afe4+FrgAuDPFXw+AbwBrgy4iTjwMvOzuY4BzSOHXxcyygHuAkLuPp/k2L7ODrSr2kiLoiWJylFTi7tvcfUX46300/0c+ah6AVGFmw2i+2d7jQdcSNDPrA1wK/DeAu9e5+55gqwpcV+AUM+sK9CAJ77CbLEHf2uQoKRtskcxsJDAJWBpsJYH6BfDPQFPQhcSB04FK4P+FW1mPm1nPoIsKirtvBX4KlADbgL3u/mqwVcVesgR9VBOcpBoz6wU8C3yzxXSPKcPMrgMq3H150LXEia7AucAv3X0ScABI2TEtM+tP82//OcBQoKeZfTHYqmIvWYJeE5y0YGbdaA75J939uaDrCdBFwPVm9jHNLb0rzOx3wZYUqDKgzN0P/4b3DM3Bn6quAja7e6W71wPPARcGXFPMJUvQtzk5SioxM6O5B7vW3X8WdD1BcvcH3H2Yu4+k+d/Fm+6edGds0XL37UCpmZ0ZXnUlzfNFpKoS4AIz6xH+f3MlSTg4Hc3k4HHvWJOjBFxWkC4CbgVWm9nK8Lpvu/tLAdYk8eNu4MnwSdEm4EsB1xMYd19qZs8AK2i+Wq2QJLwdgm6BICKS5JKldSMiIsegoBcRSXIKehGRJKegFxFJcgp6EZEkp6AXEUlyCnoRkST3/wExrvX2Yp2E/QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(history.history['val_accuracy'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1a62db65d0>]"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAA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cD5wC7nXLFzrgn4BzCX8D/f0PW5PeF8C7VAXwOM814Jj8FzEWVJkGvyO2/f8d+Azc6537Z7aglwnffr64BXerq2QHHO3eWcy3DOZeI5r287574ELAe+4N0trI4ZwDm3H8g3swneTecBmwjjc+21BzjNzBK8v++Hjjusz7dXV+d2CfBV72iX04CKQ10zPnPOhdQ/4GJgG7AD+FGw6wnQMZ6B56PWBmC999/FePqU3wK2e/87MNi1Buj4zwZe8349GvgIyAWeB2KDXV8AjncGkO093y8DKX3hXAP3AFuAjcATQGy4nW/gaTzXCJrwtMBv7Orc4ulyWezNtk/xjAA6pvfT1H8RkTARal0uIiLSBQW6iEiYUKCLiIQJBbqISJhQoIuIhAkFuohImFCgi4iEif8PLfTZvZUyQIAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(history.history['val_accuracy'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 16.9020 - accuracy: 0.3116\n",
      "Epoch 2/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 1.4089 - accuracy: 0.3776\n",
      "Epoch 3/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 1.2639 - accuracy: 0.3646\n",
      "Epoch 4/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 1.1093 - accuracy: 0.4670\n",
      "Epoch 5/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.8712 - accuracy: 0.6285\n",
      "Epoch 6/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.6662 - accuracy: 0.7118\n",
      "Epoch 7/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.6245 - accuracy: 0.6979\n",
      "Epoch 8/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.5302 - accuracy: 0.7526\n",
      "Epoch 9/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.4407 - accuracy: 0.8021\n",
      "Epoch 10/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.4140 - accuracy: 0.7899\n",
      "Epoch 11/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.3782 - accuracy: 0.8394\n",
      "Epoch 12/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.3632 - accuracy: 0.8342\n",
      "Epoch 13/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.3418 - accuracy: 0.8464\n",
      "Epoch 14/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.3142 - accuracy: 0.8681\n",
      "Epoch 15/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.3089 - accuracy: 0.8715\n",
      "Epoch 16/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.2419 - accuracy: 0.9002\n",
      "Epoch 17/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.2667 - accuracy: 0.8837\n",
      "Epoch 18/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.2446 - accuracy: 0.9028\n",
      "Epoch 19/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.2295 - accuracy: 0.9071\n",
      "Epoch 20/70\n",
      "1152/1152 [==============================] - 60s 52ms/step - loss: 0.1811 - accuracy: 0.9323\n",
      "Epoch 21/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.1591 - accuracy: 0.9358\n",
      "Epoch 22/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.1950 - accuracy: 0.9158\n",
      "Epoch 23/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.1626 - accuracy: 0.9401\n",
      "Epoch 24/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.1518 - accuracy: 0.9392\n",
      "Epoch 25/70\n",
      "1152/1152 [==============================] - 56s 48ms/step - loss: 0.1281 - accuracy: 0.9592\n",
      "Epoch 26/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.1153 - accuracy: 0.9653\n",
      "Epoch 27/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0897 - accuracy: 0.9696\n",
      "Epoch 28/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.1015 - accuracy: 0.9722\n",
      "Epoch 29/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0844 - accuracy: 0.9774\n",
      "Epoch 30/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0793 - accuracy: 0.9774\n",
      "Epoch 31/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0673 - accuracy: 0.9835\n",
      "Epoch 32/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0866 - accuracy: 0.9696\n",
      "Epoch 33/70\n",
      "1152/1152 [==============================] - 55s 48ms/step - loss: 0.0695 - accuracy: 0.9800\n",
      "Epoch 34/70\n",
      "1152/1152 [==============================] - 55s 48ms/step - loss: 0.0540 - accuracy: 0.9852\n",
      "Epoch 35/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0725 - accuracy: 0.9757\n",
      "Epoch 36/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0670 - accuracy: 0.9766\n",
      "Epoch 37/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0519 - accuracy: 0.9852\n",
      "Epoch 38/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0468 - accuracy: 0.9913\n",
      "Epoch 39/70\n",
      "1152/1152 [==============================] - 55s 48ms/step - loss: 0.0516 - accuracy: 0.9878\n",
      "Epoch 40/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0415 - accuracy: 0.9913\n",
      "Epoch 41/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0388 - accuracy: 0.9887\n",
      "Epoch 42/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0408 - accuracy: 0.9861\n",
      "Epoch 43/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0421 - accuracy: 0.9870\n",
      "Epoch 44/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0365 - accuracy: 0.9887\n",
      "Epoch 45/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0296 - accuracy: 0.9922\n",
      "Epoch 46/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0393 - accuracy: 0.9870\n",
      "Epoch 47/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0317 - accuracy: 0.9896\n",
      "Epoch 48/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0307 - accuracy: 0.9931\n",
      "Epoch 49/70\n",
      "1152/1152 [==============================] - 56s 48ms/step - loss: 0.0207 - accuracy: 0.9939\n",
      "Epoch 50/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0227 - accuracy: 0.9965\n",
      "Epoch 51/70\n",
      "1152/1152 [==============================] - 62s 54ms/step - loss: 0.0130 - accuracy: 0.9974\n",
      "Epoch 52/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0297 - accuracy: 0.9931\n",
      "Epoch 53/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0298 - accuracy: 0.9913\n",
      "Epoch 54/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.0217 - accuracy: 0.9965\n",
      "Epoch 55/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0201 - accuracy: 0.9948\n",
      "Epoch 56/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0145 - accuracy: 0.9974\n",
      "Epoch 57/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0169 - accuracy: 0.9948\n",
      "Epoch 58/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0320 - accuracy: 0.9905\n",
      "Epoch 59/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0404 - accuracy: 0.9878\n",
      "Epoch 60/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0362 - accuracy: 0.9931\n",
      "Epoch 61/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0360 - accuracy: 0.9887\n",
      "Epoch 62/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0286 - accuracy: 0.9905\n",
      "Epoch 63/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0277 - accuracy: 0.9922\n",
      "Epoch 64/70\n",
      "1152/1152 [==============================] - 56s 48ms/step - loss: 0.0203 - accuracy: 0.9948\n",
      "Epoch 65/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0218 - accuracy: 0.9913\n",
      "Epoch 66/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0213 - accuracy: 0.9957\n",
      "Epoch 67/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0228 - accuracy: 0.9931\n",
      "Epoch 68/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0189 - accuracy: 0.9948\n",
      "Epoch 69/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0555 - accuracy: 0.9835\n",
      "Epoch 70/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0726 - accuracy: 0.9740\n",
      "288/288 [==============================] - 6s 22ms/step\n",
      "Epoch 1/70\n",
      "1152/1152 [==============================] - 60s 52ms/step - loss: 13.6956 - accuracy: 0.2769\n",
      "Epoch 2/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 1.5118 - accuracy: 0.3733\n",
      "Epoch 3/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 1.4593 - accuracy: 0.4488\n",
      "Epoch 4/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 1.3228 - accuracy: 0.4957\n",
      "Epoch 5/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 1.0583 - accuracy: 0.5417\n",
      "Epoch 6/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.7187 - accuracy: 0.6780\n",
      "Epoch 7/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.6799 - accuracy: 0.6840\n",
      "Epoch 8/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.5959 - accuracy: 0.7248\n",
      "Epoch 9/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.5065 - accuracy: 0.7587\n",
      "Epoch 10/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.4992 - accuracy: 0.7734\n",
      "Epoch 11/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.4414 - accuracy: 0.7977\n",
      "Epoch 12/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.3761 - accuracy: 0.8385\n",
      "Epoch 13/70\n",
      "1152/1152 [==============================] - 56s 48ms/step - loss: 0.3671 - accuracy: 0.8307\n",
      "Epoch 14/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.3521 - accuracy: 0.8403\n",
      "Epoch 15/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.3416 - accuracy: 0.8559\n",
      "Epoch 16/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.3137 - accuracy: 0.8689\n",
      "Epoch 17/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.2980 - accuracy: 0.8793\n",
      "Epoch 18/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.2842 - accuracy: 0.8932\n",
      "Epoch 19/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.2688 - accuracy: 0.8811\n",
      "Epoch 20/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.2333 - accuracy: 0.9158\n",
      "Epoch 21/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.2465 - accuracy: 0.9045\n",
      "Epoch 22/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.2162 - accuracy: 0.9158\n",
      "Epoch 23/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.2297 - accuracy: 0.9080\n",
      "Epoch 24/70\n",
      "1152/1152 [==============================] - 55s 48ms/step - loss: 0.1950 - accuracy: 0.9280\n",
      "Epoch 25/70\n",
      "1152/1152 [==============================] - 55s 48ms/step - loss: 0.1787 - accuracy: 0.9375\n",
      "Epoch 26/70\n",
      "1152/1152 [==============================] - 55s 48ms/step - loss: 0.1600 - accuracy: 0.9401\n",
      "Epoch 27/70\n",
      "1152/1152 [==============================] - 55s 48ms/step - loss: 0.1394 - accuracy: 0.9497\n",
      "Epoch 28/70\n",
      "1152/1152 [==============================] - 56s 48ms/step - loss: 0.1642 - accuracy: 0.9392\n",
      "Epoch 29/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.1419 - accuracy: 0.9523\n",
      "Epoch 30/70\n",
      "1152/1152 [==============================] - 55s 47ms/step - loss: 0.1361 - accuracy: 0.9462\n",
      "Epoch 31/70\n",
      "1152/1152 [==============================] - 55s 48ms/step - loss: 0.1368 - accuracy: 0.9514\n",
      "Epoch 32/70\n",
      "1152/1152 [==============================] - 55s 47ms/step - loss: 0.1255 - accuracy: 0.9540\n",
      "Epoch 33/70\n",
      "1152/1152 [==============================] - 55s 47ms/step - loss: 0.1342 - accuracy: 0.9531\n",
      "Epoch 34/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.1528 - accuracy: 0.9418\n",
      "Epoch 35/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.1121 - accuracy: 0.9635\n",
      "Epoch 36/70\n",
      "1152/1152 [==============================] - 55s 47ms/step - loss: 0.1244 - accuracy: 0.9592\n",
      "Epoch 37/70\n",
      "1152/1152 [==============================] - 55s 47ms/step - loss: 0.0845 - accuracy: 0.9740\n",
      "Epoch 38/70\n",
      "1152/1152 [==============================] - 55s 47ms/step - loss: 0.0798 - accuracy: 0.9792\n",
      "Epoch 39/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.0789 - accuracy: 0.9774\n",
      "Epoch 40/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.0635 - accuracy: 0.9800\n",
      "Epoch 41/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.0565 - accuracy: 0.9861\n",
      "Epoch 42/70\n",
      "1152/1152 [==============================] - 55s 48ms/step - loss: 0.0688 - accuracy: 0.9783\n",
      "Epoch 43/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0683 - accuracy: 0.9757\n",
      "Epoch 44/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0920 - accuracy: 0.9679\n",
      "Epoch 45/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0966 - accuracy: 0.9661\n",
      "Epoch 46/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0621 - accuracy: 0.9835\n",
      "Epoch 47/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0684 - accuracy: 0.9783\n",
      "Epoch 48/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0578 - accuracy: 0.9826\n",
      "Epoch 49/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0492 - accuracy: 0.9870\n",
      "Epoch 50/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0359 - accuracy: 0.9939\n",
      "Epoch 51/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0353 - accuracy: 0.9905\n",
      "Epoch 52/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0315 - accuracy: 0.9922\n",
      "Epoch 53/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0312 - accuracy: 0.9931\n",
      "Epoch 54/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0293 - accuracy: 0.9931\n",
      "Epoch 55/70\n",
      "1152/1152 [==============================] - 55s 47ms/step - loss: 0.0408 - accuracy: 0.9905\n",
      "Epoch 56/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.0425 - accuracy: 0.9852\n",
      "Epoch 57/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0390 - accuracy: 0.9878\n",
      "Epoch 58/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0352 - accuracy: 0.9913\n",
      "Epoch 59/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0222 - accuracy: 0.9957\n",
      "Epoch 60/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0259 - accuracy: 0.9939\n",
      "Epoch 61/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0198 - accuracy: 0.9948\n",
      "Epoch 62/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0329 - accuracy: 0.9896\n",
      "Epoch 63/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0301 - accuracy: 0.9939\n",
      "Epoch 64/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0248 - accuracy: 0.9922\n",
      "Epoch 65/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0358 - accuracy: 0.9939\n",
      "Epoch 66/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0352 - accuracy: 0.9870\n",
      "Epoch 67/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0326 - accuracy: 0.9870\n",
      "Epoch 68/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0360 - accuracy: 0.9896\n",
      "Epoch 69/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0244 - accuracy: 0.9939\n",
      "Epoch 70/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0296 - accuracy: 0.9922\n",
      "288/288 [==============================] - 6s 22ms/step\n",
      "Epoch 1/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 13.6108 - accuracy: 0.3516\n",
      "Epoch 2/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 1.6037 - accuracy: 0.3863\n",
      "Epoch 3/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 1.5555 - accuracy: 0.3611\n",
      "Epoch 4/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 1.4794 - accuracy: 0.3828\n",
      "Epoch 5/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 1.4047 - accuracy: 0.4045\n",
      "Epoch 6/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 1.3094 - accuracy: 0.4566\n",
      "Epoch 7/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 1.0690 - accuracy: 0.5503\n",
      "Epoch 8/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.8305 - accuracy: 0.6181\n",
      "Epoch 9/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.6716 - accuracy: 0.6814\n",
      "Epoch 10/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.5602 - accuracy: 0.7457\n",
      "Epoch 11/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.4923 - accuracy: 0.7700\n",
      "Epoch 12/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.4606 - accuracy: 0.7856\n",
      "Epoch 13/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.4169 - accuracy: 0.8177\n",
      "Epoch 14/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.3585 - accuracy: 0.8594\n",
      "Epoch 15/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.3272 - accuracy: 0.8611\n",
      "Epoch 16/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.3281 - accuracy: 0.8576\n",
      "Epoch 17/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.3361 - accuracy: 0.8472\n",
      "Epoch 18/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.2902 - accuracy: 0.8698\n",
      "Epoch 19/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.2492 - accuracy: 0.8915\n",
      "Epoch 20/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.2286 - accuracy: 0.9071\n",
      "Epoch 21/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.2496 - accuracy: 0.8898\n",
      "Epoch 22/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.2350 - accuracy: 0.9106\n",
      "Epoch 23/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.2031 - accuracy: 0.9280\n",
      "Epoch 24/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.1942 - accuracy: 0.9236\n",
      "Epoch 25/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.1746 - accuracy: 0.9427\n",
      "Epoch 26/70\n",
      "1152/1152 [==============================] - 66s 58ms/step - loss: 0.1616 - accuracy: 0.9444\n",
      "Epoch 27/70\n",
      "1152/1152 [==============================] - 60s 52ms/step - loss: 0.1307 - accuracy: 0.9575\n",
      "Epoch 28/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.1493 - accuracy: 0.9436\n",
      "Epoch 29/70\n",
      "1152/1152 [==============================] - 59s 52ms/step - loss: 0.1240 - accuracy: 0.9592\n",
      "Epoch 30/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.1323 - accuracy: 0.9523\n",
      "Epoch 31/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.1582 - accuracy: 0.9384\n",
      "Epoch 32/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.1551 - accuracy: 0.9436\n",
      "Epoch 33/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.1834 - accuracy: 0.9236\n",
      "Epoch 34/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.1813 - accuracy: 0.9193\n",
      "Epoch 35/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.1338 - accuracy: 0.9540\n",
      "Epoch 36/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.1159 - accuracy: 0.9679\n",
      "Epoch 37/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0914 - accuracy: 0.9679\n",
      "Epoch 38/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0893 - accuracy: 0.9740\n",
      "Epoch 39/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0865 - accuracy: 0.9688\n",
      "Epoch 40/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0674 - accuracy: 0.9826\n",
      "Epoch 41/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0602 - accuracy: 0.9896\n",
      "Epoch 42/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0718 - accuracy: 0.9766\n",
      "Epoch 43/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0484 - accuracy: 0.9887\n",
      "Epoch 44/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0480 - accuracy: 0.9878\n",
      "Epoch 45/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0574 - accuracy: 0.9826\n",
      "Epoch 46/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0743 - accuracy: 0.9826\n",
      "Epoch 47/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0534 - accuracy: 0.9844\n",
      "Epoch 48/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0647 - accuracy: 0.9757\n",
      "Epoch 49/70\n",
      "1152/1152 [==============================] - 61s 53ms/step - loss: 0.0636 - accuracy: 0.9792\n",
      "Epoch 50/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0623 - accuracy: 0.9844\n",
      "Epoch 51/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0454 - accuracy: 0.9905\n",
      "Epoch 52/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0486 - accuracy: 0.9878\n",
      "Epoch 53/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.0488 - accuracy: 0.9861\n",
      "Epoch 54/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0403 - accuracy: 0.9887\n",
      "Epoch 55/70\n",
      "1152/1152 [==============================] - 61s 53ms/step - loss: 0.0339 - accuracy: 0.9922\n",
      "Epoch 56/70\n",
      "1152/1152 [==============================] - 60s 52ms/step - loss: 0.0339 - accuracy: 0.9922\n",
      "Epoch 57/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0419 - accuracy: 0.9931\n",
      "Epoch 58/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0443 - accuracy: 0.9861\n",
      "Epoch 59/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0291 - accuracy: 0.9939\n",
      "Epoch 60/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.0334 - accuracy: 0.9896\n",
      "Epoch 61/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0209 - accuracy: 0.9974\n",
      "Epoch 62/70\n",
      "1152/1152 [==============================] - 55s 48ms/step - loss: 0.0238 - accuracy: 0.9939\n",
      "Epoch 63/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.0437 - accuracy: 0.9870\n",
      "Epoch 64/70\n",
      "1152/1152 [==============================] - 55s 48ms/step - loss: 0.0356 - accuracy: 0.9905\n",
      "Epoch 65/70\n",
      "1152/1152 [==============================] - 54950s 48s/step - loss: 0.0269 - accuracy: 0.9922\n",
      "Epoch 66/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0313 - accuracy: 0.9931\n",
      "Epoch 67/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.0296 - accuracy: 0.9887\n",
      "Epoch 68/70\n",
      "1152/1152 [==============================] - 55s 48ms/step - loss: 0.0241 - accuracy: 0.9931\n",
      "Epoch 69/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.0226 - accuracy: 0.9939\n",
      "Epoch 70/70\n",
      "1152/1152 [==============================] - 55s 47ms/step - loss: 0.0297 - accuracy: 0.9913\n",
      "288/288 [==============================] - 6s 22ms/step\n",
      "Epoch 1/70\n",
      "1152/1152 [==============================] - 61s 53ms/step - loss: 12.9189 - accuracy: 0.3168\n",
      "Epoch 2/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 1.5774 - accuracy: 0.3533\n",
      "Epoch 3/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 1.5084 - accuracy: 0.3507\n",
      "Epoch 4/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 1.3371 - accuracy: 0.3837\n",
      "Epoch 5/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 1.1668 - accuracy: 0.4462\n",
      "Epoch 6/70\n",
      "1152/1152 [==============================] - 55s 48ms/step - loss: 0.9714 - accuracy: 0.5530\n",
      "Epoch 7/70\n",
      "1152/1152 [==============================] - 56s 48ms/step - loss: 0.8972 - accuracy: 0.5877\n",
      "Epoch 8/70\n",
      "1152/1152 [==============================] - 56s 48ms/step - loss: 0.7017 - accuracy: 0.6727\n",
      "Epoch 9/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.6287 - accuracy: 0.7205\n",
      "Epoch 10/70\n",
      "1152/1152 [==============================] - 56s 48ms/step - loss: 0.6056 - accuracy: 0.7040\n",
      "Epoch 11/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.5307 - accuracy: 0.7561\n",
      "Epoch 12/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.4278 - accuracy: 0.7977\n",
      "Epoch 13/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.3704 - accuracy: 0.8429\n",
      "Epoch 14/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.3421 - accuracy: 0.8568\n",
      "Epoch 15/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.3122 - accuracy: 0.8663\n",
      "Epoch 16/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.2933 - accuracy: 0.8594\n",
      "Epoch 17/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.2534 - accuracy: 0.8828\n",
      "Epoch 18/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.2237 - accuracy: 0.9115\n",
      "Epoch 19/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.2066 - accuracy: 0.9271\n",
      "Epoch 20/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.2045 - accuracy: 0.9132\n",
      "Epoch 21/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.1874 - accuracy: 0.9280\n",
      "Epoch 22/70\n",
      "1152/1152 [==============================] - 52s 46ms/step - loss: 0.1875 - accuracy: 0.9236\n",
      "Epoch 23/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.2006 - accuracy: 0.9089\n",
      "Epoch 24/70\n",
      "1152/1152 [==============================] - 52s 46ms/step - loss: 0.1579 - accuracy: 0.9427\n",
      "Epoch 25/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.1477 - accuracy: 0.9523\n",
      "Epoch 26/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.1508 - accuracy: 0.9462\n",
      "Epoch 27/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.1098 - accuracy: 0.9653\n",
      "Epoch 28/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0861 - accuracy: 0.9714\n",
      "Epoch 29/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0732 - accuracy: 0.9818\n",
      "Epoch 30/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0572 - accuracy: 0.9878\n",
      "Epoch 31/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.0654 - accuracy: 0.9809\n",
      "Epoch 32/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0527 - accuracy: 0.9896\n",
      "Epoch 33/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0613 - accuracy: 0.9826\n",
      "Epoch 34/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0445 - accuracy: 0.9931\n",
      "Epoch 35/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0343 - accuracy: 0.9931\n",
      "Epoch 36/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0358 - accuracy: 0.9922\n",
      "Epoch 37/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0295 - accuracy: 0.9939\n",
      "Epoch 38/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.0406 - accuracy: 0.9870\n",
      "Epoch 39/70\n",
      "1152/1152 [==============================] - 57s 50ms/step - loss: 0.0444 - accuracy: 0.9870\n",
      "Epoch 40/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0652 - accuracy: 0.9792\n",
      "Epoch 41/70\n",
      "1152/1152 [==============================] - 79s 69ms/step - loss: 0.0624 - accuracy: 0.9844\n",
      "Epoch 42/70\n",
      "1152/1152 [==============================] - 55s 47ms/step - loss: 0.0515 - accuracy: 0.9835\n",
      "Epoch 43/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0626 - accuracy: 0.9818\n",
      "Epoch 44/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.0382 - accuracy: 0.9913\n",
      "Epoch 45/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.0325 - accuracy: 0.9913\n",
      "Epoch 46/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0322 - accuracy: 0.9896\n",
      "Epoch 47/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0327 - accuracy: 0.9913\n",
      "Epoch 48/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0252 - accuracy: 0.9957\n",
      "Epoch 49/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0182 - accuracy: 0.9974\n",
      "Epoch 50/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0207 - accuracy: 0.9957\n",
      "Epoch 51/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0193 - accuracy: 0.9957\n",
      "Epoch 52/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0161 - accuracy: 0.9983\n",
      "Epoch 53/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0100 - accuracy: 0.9983\n",
      "Epoch 54/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0158 - accuracy: 0.9974\n",
      "Epoch 55/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.0134 - accuracy: 0.9965\n",
      "Epoch 56/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0169 - accuracy: 0.9948\n",
      "Epoch 57/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0145 - accuracy: 0.9957\n",
      "Epoch 58/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0095 - accuracy: 0.9983\n",
      "Epoch 59/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0087 - accuracy: 0.9983\n",
      "Epoch 60/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0093 - accuracy: 0.9991\n",
      "Epoch 61/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0179 - accuracy: 0.9974\n",
      "Epoch 62/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0163 - accuracy: 0.9948\n",
      "Epoch 63/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0180 - accuracy: 0.9948\n",
      "Epoch 64/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0116 - accuracy: 0.9983\n",
      "Epoch 65/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0166 - accuracy: 0.9957\n",
      "Epoch 66/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0183 - accuracy: 0.9948\n",
      "Epoch 67/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0126 - accuracy: 0.9983\n",
      "Epoch 68/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0123 - accuracy: 0.9965\n",
      "Epoch 69/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0086 - accuracy: 0.9983\n",
      "Epoch 70/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0100 - accuracy: 0.9983\n",
      "288/288 [==============================] - 6s 21ms/step\n",
      "Epoch 1/70\n",
      "1152/1152 [==============================] - 113s 98ms/step - loss: 9.5444 - accuracy: 0.3759\n",
      "Epoch 2/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 1.3569 - accuracy: 0.4149\n",
      "Epoch 3/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 1.0525 - accuracy: 0.4957\n",
      "Epoch 4/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.7222 - accuracy: 0.6927\n",
      "Epoch 5/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.6046 - accuracy: 0.7309\n",
      "Epoch 6/70\n",
      "1152/1152 [==============================] - 57s 49ms/step - loss: 0.4780 - accuracy: 0.7778\n",
      "Epoch 7/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.4451 - accuracy: 0.8073\n",
      "Epoch 8/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.3848 - accuracy: 0.8351\n",
      "Epoch 9/70\n",
      "1152/1152 [==============================] - 61s 53ms/step - loss: 0.3552 - accuracy: 0.8464\n",
      "Epoch 10/70\n",
      "1152/1152 [==============================] - 66s 57ms/step - loss: 0.2830 - accuracy: 0.8802\n",
      "Epoch 11/70\n",
      "1152/1152 [==============================] - 56s 48ms/step - loss: 0.2859 - accuracy: 0.8802\n",
      "Epoch 12/70\n",
      "1152/1152 [==============================] - 56s 49ms/step - loss: 0.2873 - accuracy: 0.8932\n",
      "Epoch 13/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.2414 - accuracy: 0.9123\n",
      "Epoch 14/70\n",
      "1152/1152 [==============================] - 60s 52ms/step - loss: 0.1821 - accuracy: 0.9288\n",
      "Epoch 15/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.1797 - accuracy: 0.9253\n",
      "Epoch 16/70\n",
      "1152/1152 [==============================] - 60s 52ms/step - loss: 0.1940 - accuracy: 0.9410\n",
      "Epoch 17/70\n",
      "1152/1152 [==============================] - 62s 54ms/step - loss: 0.1785 - accuracy: 0.9332\n",
      "Epoch 18/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.1477 - accuracy: 0.9575\n",
      "Epoch 19/70\n",
      "1152/1152 [==============================] - 63s 55ms/step - loss: 0.1257 - accuracy: 0.9618\n",
      "Epoch 20/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.1085 - accuracy: 0.9618\n",
      "Epoch 21/70\n",
      "1152/1152 [==============================] - 60s 52ms/step - loss: 0.0956 - accuracy: 0.9714\n",
      "Epoch 22/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.1012 - accuracy: 0.9722\n",
      "Epoch 23/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0727 - accuracy: 0.9809\n",
      "Epoch 24/70\n",
      "1152/1152 [==============================] - 62s 54ms/step - loss: 0.0644 - accuracy: 0.9818\n",
      "Epoch 25/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0705 - accuracy: 0.9792\n",
      "Epoch 26/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0611 - accuracy: 0.9861\n",
      "Epoch 27/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0612 - accuracy: 0.9878\n",
      "Epoch 28/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0498 - accuracy: 0.9905\n",
      "Epoch 29/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0498 - accuracy: 0.9844\n",
      "Epoch 30/70\n",
      "1152/1152 [==============================] - 60s 52ms/step - loss: 0.0415 - accuracy: 0.9931\n",
      "Epoch 31/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.0466 - accuracy: 0.9861\n",
      "Epoch 32/70\n",
      "1152/1152 [==============================] - 59s 52ms/step - loss: 0.0527 - accuracy: 0.9870\n",
      "Epoch 33/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0505 - accuracy: 0.9844\n",
      "Epoch 34/70\n",
      "1152/1152 [==============================] - 59s 52ms/step - loss: 0.0419 - accuracy: 0.9887\n",
      "Epoch 35/70\n",
      "1152/1152 [==============================] - 59s 52ms/step - loss: 0.0429 - accuracy: 0.9896\n",
      "Epoch 36/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.0568 - accuracy: 0.9835\n",
      "Epoch 37/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.0391 - accuracy: 0.9896\n",
      "Epoch 38/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0328 - accuracy: 0.9922\n",
      "Epoch 39/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.0311 - accuracy: 0.9913\n",
      "Epoch 40/70\n",
      "1152/1152 [==============================] - 61s 53ms/step - loss: 0.0359 - accuracy: 0.9896\n",
      "Epoch 41/70\n",
      "1152/1152 [==============================] - 61s 53ms/step - loss: 0.0299 - accuracy: 0.9922\n",
      "Epoch 42/70\n",
      "1152/1152 [==============================] - 60s 52ms/step - loss: 0.0352 - accuracy: 0.9896\n",
      "Epoch 43/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0268 - accuracy: 0.9957\n",
      "Epoch 44/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0181 - accuracy: 0.9974\n",
      "Epoch 45/70\n",
      "1152/1152 [==============================] - 60s 52ms/step - loss: 0.0129 - accuracy: 0.9991\n",
      "Epoch 46/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0229 - accuracy: 0.9939\n",
      "Epoch 47/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.0138 - accuracy: 0.9991\n",
      "Epoch 48/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0204 - accuracy: 0.9957\n",
      "Epoch 49/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0231 - accuracy: 0.9939\n",
      "Epoch 50/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0350 - accuracy: 0.9887\n",
      "Epoch 51/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0350 - accuracy: 0.9913\n",
      "Epoch 52/70\n",
      "1152/1152 [==============================] - 61s 53ms/step - loss: 0.0254 - accuracy: 0.9974\n",
      "Epoch 53/70\n",
      "1152/1152 [==============================] - 60s 52ms/step - loss: 0.0164 - accuracy: 0.9983\n",
      "Epoch 54/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0125 - accuracy: 0.9991\n",
      "Epoch 55/70\n",
      "1152/1152 [==============================] - 60s 52ms/step - loss: 0.0128 - accuracy: 0.9974\n",
      "Epoch 56/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0181 - accuracy: 0.9939\n",
      "Epoch 57/70\n",
      "1152/1152 [==============================] - 58s 51ms/step - loss: 0.0122 - accuracy: 0.9983\n",
      "Epoch 58/70\n",
      "1152/1152 [==============================] - 59s 51ms/step - loss: 0.0120 - accuracy: 0.9965\n",
      "Epoch 59/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0104 - accuracy: 0.9991\n",
      "Epoch 60/70\n",
      "1152/1152 [==============================] - 59s 52ms/step - loss: 0.0101 - accuracy: 0.9983\n",
      "Epoch 61/70\n",
      "1152/1152 [==============================] - 58s 50ms/step - loss: 0.0083 - accuracy: 0.9983\n",
      "Epoch 62/70\n",
      "1152/1152 [==============================] - 54s 47ms/step - loss: 0.0106 - accuracy: 0.9983\n",
      "Epoch 63/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0197 - accuracy: 0.9939\n",
      "Epoch 64/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0239 - accuracy: 0.9939\n",
      "Epoch 65/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0458 - accuracy: 0.9826\n",
      "Epoch 66/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.1714 - accuracy: 0.9453\n",
      "Epoch 67/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.1054 - accuracy: 0.9644\n",
      "Epoch 68/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0465 - accuracy: 0.9852\n",
      "Epoch 69/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0256 - accuracy: 0.9931\n",
      "Epoch 70/70\n",
      "1152/1152 [==============================] - 53s 46ms/step - loss: 0.0153 - accuracy: 0.9957\n",
      "288/288 [==============================] - 6s 21ms/step\n",
      "\n",
      "K-fold cross validation Accuracy: ['0.7569', '0.8056', '0.7882', '0.7778', '0.7361']\n"
     ]
    }
   ],
   "source": [
    "skf = KFold(n_splits=5, shuffle=True)\n",
    "\n",
    "accuracy = []\n",
    "\n",
    "for t, v in skf.split(train_data, train_label):\n",
    "    model = LeNet.build(input_shape = (120, 150, 1), classes = 6)\n",
    "    model.compile(loss = \"categorical_crossentropy\", optimizer=Adam(), metrics=[\"accuracy\"])\n",
    "    \n",
    "    history = model.fit(train_data[t], train_label[t], batch_size=128, epochs=70, verbose=1)\n",
    "\n",
    "    k_accuracy = '%.4f' % (model.evaluate(train_data[v], train_label[v])[1])\n",
    "    accuracy.append(k_accuracy)\n",
    "\n",
    "# 전체 검증 결과 출력\n",
    "print('\\nK-fold cross validation Accuracy: {}'.format(accuracy))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}