Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import keras\n",
"from keras.models import Sequential\n",
"from keras.layers import Dense, Activation, Dropout\n",
"from keras.initializers import VarianceScaling, Zeros\n",
"from keras.layers.core import Dense, Dropout, Activation \n",
"from keras.optimizers import SGD \n",
"from keras.datasets import mnist \n",
"import numpy \n",
"import matplotlib.pyplot as plt\n",
"\n",
"'''\n",
" 1、モデルを選ぶ\n",
"'''\n",
"model = Sequential()\n",
"'''\n",
" 2、ニューラルネットワークの構築\n",
"'''\n",
"\n",
"model.add(Dense(bias_initializer=Zeros(), batch_input_shape=(None, 784), dtype='float32', use_bias=True, units=784, trainable=True, kernel_initializer=VarianceScaling(mode='fan_avg', seed=None, scale=1.0, distribution='uniform'), activation='linear'))\n",
"model.add(Activation(activation='tanh', trainable=True))\n",
"model.add(Dropout(rate=0.4, trainable=True))\n",
"model.add(Dense(bias_initializer=Zeros(), use_bias=True, units=784, trainable=True, kernel_initializer=VarianceScaling(mode='fan_avg', seed=None, scale=1.0, distribution='uniform'), activation='linear'))\n",
"model.add(Activation(activation='tanh', trainable=True))\n",
"model.add(Dropout(rate=0.4, trainable=True))\n",
"model.add(Dense(bias_initializer=Zeros(), use_bias=True, units=10, trainable=True, kernel_initializer=VarianceScaling(mode='fan_avg', seed=None, scale=1.0, distribution='uniform'), activation='linear'))\n",
"model.add(Activation(activation='softmax', trainable=True))\n",
"\n",
"\n",
"'''\n",
" 3、コンパイル\n",
"'''\n",
"sgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True) \n",
"model.compile(loss='categorical_crossentropy', optimizer=sgd) \n",
"\n",
"'''\n",
" 4、Training\n",
" \n",
"'''\n",
"(X_train, y_train), (X_test, y_test) = mnist.load_data() \n",
"X_train = X_train.reshape(X_train.shape[0], X_train.shape[1] * X_train.shape[2]) \n",
"X_test = X_test .reshape(X_test.shape[0], X_test.shape[1] * X_test.shape[2]) \n",
"Y_train = (numpy.arange(10) == y_train[:, None]).astype(int) \n",
"Y_test = (numpy.arange(10) == y_test[:, None]).astype(int)\n",
" \n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(60000, 784)\n",
"(60000, 10)\n"
]
}
],
"source": [
"print(X_train.shape)\n",
"print(Y_train.shape)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"application/dsw+json": {
"graph": {
"edges": [
{
"id": 1,
"label": "",
"properties": {},
"shape": {
"fill": "",
"type": ""
},
"source": "b7101e1d-d18d-41c2-8be6-48ce22f82402",
"sourceAnchor": 1,
"target": "69d0b13c-de19-4777-844a-c34b703612d8",
"targetAnchor": 0
},
{
"id": 2,
"label": "",
"properties": {},
"shape": {
"fill": "",
"type": ""
},
"source": "69d0b13c-de19-4777-844a-c34b703612d8",
"sourceAnchor": 1,
"target": "51d08d6b-a2f8-408e-9da4-75d1f9161d30",
"targetAnchor": 0
},
{
"id": 3,
"label": "",
"properties": {},
"shape": {
"fill": "",
"type": ""
},
"source": "51d08d6b-a2f8-408e-9da4-75d1f9161d30",
"sourceAnchor": 1,
"target": "7fd6014f-4bd3-4600-b90f-abefaa48938d",
"targetAnchor": 0
},
{
"id": 4,
"label": "",
"properties": {},
"shape": {
"fill": "",
"type": ""
},
"source": "7fd6014f-4bd3-4600-b90f-abefaa48938d",
"sourceAnchor": 1,
"target": "c2978649-8bb9-4254-a14a-0701ec393b61",
"targetAnchor": 0
},
{
"id": 5,
"label": "",
"properties": {},
"shape": {
"fill": "",
"type": ""
},
"source": "c2978649-8bb9-4254-a14a-0701ec393b61",
"sourceAnchor": 1,
"target": "9620d76a-fec6-4aab-abcc-49e982c97e37",
"targetAnchor": 0
},
{
"id": 6,
"label": "",
"properties": {},
"shape": {
"fill": "",
"type": ""
},
"source": "9620d76a-fec6-4aab-abcc-49e982c97e37",
"sourceAnchor": 1,
"target": "f8eee06a-6334-404f-82bb-ac0810d6d844",
"targetAnchor": 0
},
{
"id": 7,
"label": "",
"properties": {},
"shape": {
"fill": "",
"type": ""
},
"source": "f8eee06a-6334-404f-82bb-ac0810d6d844",
"sourceAnchor": 1,
"target": "a4812488-91e3-455e-a6df-98bb28b9db19",
"targetAnchor": 0
}
],
"groups": [],
"nodes": [
{
"id": "b7101e1d-d18d-41c2-8be6-48ce22f82402",
"label": "dense_1",
"parent": "",
"properties": [
{
"meta": "",
"name": "name",
"value": "'dense_1'"
},
{
"meta": "",
"name": "trainable",
"value": "True"
},
{
"meta": "",
"name": "batch_input_shape",
"value": "[None, 784]"
},
{
"meta": "",
"name": "dtype",
"value": "'float32'"
},
{
"meta": "",
"name": "units",
"value": "784"
},
{
"meta": "",
"name": "activation",
"value": "'linear'"
},
{
"meta": "",
"name": "use_bias",
"value": "True"
},
{
"meta": "",
"name": "kernel_initializer",
"value": "{\"class_name\": \"VarianceScaling\", \"config\": {\"scale\": 1.0, \"mode\": \"fan_avg\", \"distribution\": \"uniform\", \"seed\": null}}"
},
{
"meta": "",
"name": "bias_initializer",
"value": "{\"class_name\": \"Zeros\", \"config\": {}}"
},
{
"meta": "",
"name": "kernel_regularizer",
"value": "None"
},
{
"meta": "",
"name": "bias_regularizer",
"value": "None"
},
{
"meta": "",
"name": "activity_regularizer",
"value": "None"
},
{
"meta": "",
"name": "kernel_constraint",
"value": "None"
},
{
"meta": "",
"name": "bias_constraint",
"value": "None"
},
{
"meta": "",
"name": "layer_id",
"value": "1ad6d027-45f9-4948-9ac0-a331247ffa42"
}
],
"shape": {
"anchor": [],
"height": 0,
"type": "",
"width": 0,
"x": 0,
"y": 0
},
"type": "Dense"
},
{
"id": "69d0b13c-de19-4777-844a-c34b703612d8",
"label": "activation_1",
"parent": "",
"properties": [
{
"meta": "",
"name": "name",
"value": "'activation_1'"
},
{
"meta": "",
"name": "trainable",
"value": "True"
},
{
"meta": "",
"name": "activation",
"value": "'tanh'"
},
{
"meta": "",
"name": "layer_id",
"value": "c62dbd7a-c3a6-42d0-aa76-6b72ddf1a6fb"
}
],
"shape": {
"anchor": [],
"height": 0,
"type": "",
"width": 0,
"x": 0,
"y": 0
},
"type": "Activation"
},
{
"id": "51d08d6b-a2f8-408e-9da4-75d1f9161d30",
"label": "dropout_1",
"parent": "",
"properties": [
{
"meta": "",
"name": "name",
"value": "'dropout_1'"
},
{
"meta": "",
"name": "trainable",
"value": "True"
},
{
"meta": "",
"name": "rate",
"value": "0.4"
},
{
"meta": "",
"name": "noise_shape",
"value": "None"
},
{
"meta": "",
"name": "seed",
"value": "None"
},
{
"meta": "",
"name": "layer_id",
"value": "62e6646c-f529-4076-9a9a-fcd21aa27443"
}
],
"shape": {
"anchor": [],
"height": 0,
"type": "",
"width": 0,
"x": 0,
"y": 0
},
"type": "Dropout"
},
{
"id": "7fd6014f-4bd3-4600-b90f-abefaa48938d",
"label": "dense_2",
"parent": "",
"properties": [
{
"meta": "",
"name": "name",
"value": "'dense_2'"
},
{
"meta": "",
"name": "trainable",
"value": "True"
},
{
"meta": "",
"name": "units",
"value": "784"
},
{
"meta": "",
"name": "activation",
"value": "'linear'"
},
{
"meta": "",
"name": "use_bias",
"value": "True"
},
{
"meta": "",
"name": "kernel_initializer",
"value": "{\"class_name\": \"VarianceScaling\", \"config\": {\"scale\": 1.0, \"mode\": \"fan_avg\", \"distribution\": \"uniform\", \"seed\": null}}"
},
{
"meta": "",
"name": "bias_initializer",
"value": "{\"class_name\": \"Zeros\", \"config\": {}}"
},
{
"meta": "",
"name": "kernel_regularizer",
"value": "None"
},
{
"meta": "",
"name": "bias_regularizer",
"value": "None"
},
{
"meta": "",
"name": "activity_regularizer",
"value": "None"
},
{
"meta": "",
"name": "kernel_constraint",
"value": "None"
},
{
"meta": "",
"name": "bias_constraint",
"value": "None"
},
{
"meta": "",
"name": "layer_id",
"value": "4f09a1fd-2537-47ed-a97a-3314ae8d9b0a"
}
],
"shape": {
"anchor": [],
"height": 0,
"type": "",
"width": 0,
"x": 0,
"y": 0
},
"type": "Dense"
},
{
"id": "c2978649-8bb9-4254-a14a-0701ec393b61",
"label": "activation_2",
"parent": "",
"properties": [
{
"meta": "",
"name": "name",
"value": "'activation_2'"
},
{
"meta": "",
"name": "trainable",
"value": "True"
},
{
"meta": "",
"name": "activation",
"value": "'tanh'"
},
{
"meta": "",
"name": "layer_id",
"value": "ef2e7ccb-8651-4e5d-8a6c-820c005ebd3d"
}
],
"shape": {
"anchor": [],
"height": 0,
"type": "",
"width": 0,
"x": 0,
"y": 0
},
"type": "Activation"
},
{
"id": "9620d76a-fec6-4aab-abcc-49e982c97e37",
"label": "dropout_2",
"parent": "",
"properties": [
{
"meta": "",
"name": "name",
"value": "'dropout_2'"
},
{
"meta": "",
"name": "trainable",
"value": "True"
},
{
"meta": "",
"name": "rate",
"value": "0.4"
},
{
"meta": "",
"name": "noise_shape",
"value": "None"
},
{
"meta": "",
"name": "seed",
"value": "None"
},
{
"meta": "",
"name": "layer_id",
"value": "b36f9e6b-ed44-438f-bb5d-3a5c5b49e3d0"
}
],
"shape": {
"anchor": [],
"height": 0,
"type": "",
"width": 0,
"x": 0,
"y": 0
},
"type": "Dropout"
},
{
"id": "f8eee06a-6334-404f-82bb-ac0810d6d844",
"label": "dense_3",
"parent": "",
"properties": [
{
"meta": "",
"name": "name",
"value": "'dense_3'"
},
{
"meta": "",
"name": "trainable",
"value": "True"
},
{
"meta": "",
"name": "units",
"value": "10"
},
{
"meta": "",
"name": "activation",
"value": "'linear'"
},
{
"meta": "",
"name": "use_bias",
"value": "True"
},
{
"meta": "",
"name": "kernel_initializer",
"value": "{\"class_name\": \"VarianceScaling\", \"config\": {\"scale\": 1.0, \"mode\": \"fan_avg\", \"distribution\": \"uniform\", \"seed\": null}}"
},
{
"meta": "",
"name": "bias_initializer",
"value": "{\"class_name\": \"Zeros\", \"config\": {}}"
},
{
"meta": "",
"name": "kernel_regularizer",
"value": "None"
},
{
"meta": "",
"name": "bias_regularizer",
"value": "None"
},
{
"meta": "",
"name": "activity_regularizer",
"value": "None"
},
{
"meta": "",
"name": "kernel_constraint",
"value": "None"
},
{
"meta": "",
"name": "bias_constraint",
"value": "None"
},
{
"meta": "",
"name": "layer_id",
"value": "c10b5c67-4bf0-41f2-88c0-6356983929e3"
}
],
"shape": {
"anchor": [],
"height": 0,
"type": "",
"width": 0,
"x": 0,
"y": 0
},
"type": "Dense"
},
{
"id": "a4812488-91e3-455e-a6df-98bb28b9db19",
"label": "activation_3",
"parent": "",
"properties": [
{
"meta": "",
"name": "name",
"value": "'activation_3'"
},
{
"meta": "",
"name": "trainable",
"value": "True"
},
{
"meta": "",
"name": "activation",
"value": "'softmax'"
},
{
"meta": "",
"name": "layer_id",
"value": "c9679903-60b9-4b3f-a10a-7878a608726a"
}
],
"shape": {
"anchor": [],
"height": 0,
"type": "",
"width": 0,
"x": 0,
"y": 0
},
"type": "Activation"
}
]
},
"layer_line": {
"code_map": {
"1": "import keras\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Activation, Dropout\nfrom keras.initializers import VarianceScaling, Zeros\nfrom keras.layers.core import Dense, Dropout, Activation \nfrom keras.optimizers import SGD \nfrom keras.datasets import mnist \nimport numpy \nimport matplotlib.pyplot as plt\n\n'''\n 1、モデルを選ぶ\n'''\nmodel = Sequential()\n'''\n 2、ニューラルネットワークの構築\n'''\n\nmodel = Sequential()\nmodel.add(Dense(bias_initializer=Zeros(), batch_input_shape=(None, 784), dtype='float32', use_bias=True, units=784, trainable=True, kernel_initializer=VarianceScaling(mode='fan_avg', seed=None, scale=1.0, distribution='uniform'), activation='linear'))\nmodel.add(Activation(activation='tanh', trainable=True))\nmodel.add(Dropout(rate=0.4, trainable=True))\nmodel.add(Dense(bias_initializer=Zeros(), use_bias=True, units=784, trainable=True, kernel_initializer=VarianceScaling(mode='fan_avg', seed=None, scale=1.0, distribution='uniform'), activation='linear'))\nmodel.add(Activation(activation='tanh', trainable=True))\nmodel.add(Dropout(rate=0.4, trainable=True))\nmodel.add(Dense(bias_initializer=Zeros(), use_bias=True, units=10, trainable=True, kernel_initializer=VarianceScaling(mode='fan_avg', seed=None, scale=1.0, distribution='uniform'), activation='linear'))\nmodel.add(Activation(activation='softmax', trainable=True))\n\n\n'''\n 3、コンパイル\n'''\nsgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True) \nmodel.compile(loss='categorical_crossentropy', optimizer=sgd) \n\n'''\n 4、Training\n \n'''\n(X_train, y_train), (X_test, y_test) = mnist.load_data() \nX_train = X_train.reshape(X_train.shape[0], X_train.shape[1] * X_train.shape[2]) \nX_test = X_test .reshape(X_test.shape[0], X_test.shape[1] * X_test.shape[2]) \nY_train = (numpy.arange(10) == y_train[:, None]).astype(int) \nY_test = (numpy.arange(10) == y_test[:, None]).astype(int)\n \n"
},
"layer_line": {
"1ad6d027-45f9-4948-9ac0-a331247ffa42": {
"code_id": 1,
"layer_id": "1ad6d027-45f9-4948-9ac0-a331247ffa42",
"layer_name": "dense_1",
"line_no": 20
},
"4f09a1fd-2537-47ed-a97a-3314ae8d9b0a": {
"code_id": 1,
"layer_id": "4f09a1fd-2537-47ed-a97a-3314ae8d9b0a",
"layer_name": "dense_2",
"line_no": 23
},
"62e6646c-f529-4076-9a9a-fcd21aa27443": {
"code_id": 1,
"layer_id": "62e6646c-f529-4076-9a9a-fcd21aa27443",
"layer_name": "dropout_1",
"line_no": 22
},
"b36f9e6b-ed44-438f-bb5d-3a5c5b49e3d0": {
"code_id": 1,
"layer_id": "b36f9e6b-ed44-438f-bb5d-3a5c5b49e3d0",
"layer_name": "dropout_2",
"line_no": 25
},
"c10b5c67-4bf0-41f2-88c0-6356983929e3": {
"code_id": 1,
"layer_id": "c10b5c67-4bf0-41f2-88c0-6356983929e3",
"layer_name": "dense_3",
"line_no": 26
},
"c62dbd7a-c3a6-42d0-aa76-6b72ddf1a6fb": {
"code_id": 1,
"layer_id": "c62dbd7a-c3a6-42d0-aa76-6b72ddf1a6fb",
"layer_name": "activation_1",
"line_no": 21
},
"c9679903-60b9-4b3f-a10a-7878a608726a": {
"code_id": 1,
"layer_id": "c9679903-60b9-4b3f-a10a-7878a608726a",
"layer_name": "activation_3",
"line_no": 27
},
"ef2e7ccb-8651-4e5d-8a6c-820c005ebd3d": {
"code_id": 1,
"layer_id": "ef2e7ccb-8651-4e5d-8a6c-820c005ebd3d",
"layer_name": "activation_2",
"line_no": 24
}
}
}
},
"text/plain": [
"<IPython.display.DswJSON object>"
]
},
"metadata": {
"application/dsw+json": {
"expanded": false,
"root": "root"
}
},
"output_type": "display_data"
}
],
"source": [
"%show_model model"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Train on 42000 samples, validate on 18000 samples\n",
"Epoch 1/500\n",
"42000/42000 [==============================] - 2s 36us/step - loss: 0.8335 - val_loss: 0.3906\n",
"Epoch 2/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.5516 - val_loss: 0.3624\n",
"Epoch 3/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.5094 - val_loss: 0.3193\n",
"Epoch 4/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.4857 - val_loss: 0.3106\n",
"Epoch 5/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.4670 - val_loss: 0.3025\n",
"Epoch 6/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.4418 - val_loss: 0.2995\n",
"Epoch 7/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.4245 - val_loss: 0.2762\n",
"Epoch 8/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.4123 - val_loss: 0.2788\n",
"Epoch 9/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.4099 - val_loss: 0.2628\n",
"Epoch 10/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.4059 - val_loss: 0.2615\n",
"Epoch 11/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.3793 - val_loss: 0.2643\n",
"Epoch 12/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.3731 - val_loss: 0.2489\n",
"Epoch 13/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.3649 - val_loss: 0.2475\n",
"Epoch 14/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.3568 - val_loss: 0.2412\n",
"Epoch 15/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.3457 - val_loss: 0.2210\n",
"Epoch 16/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.3412 - val_loss: 0.2259\n",
"Epoch 17/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.3410 - val_loss: 0.2215\n",
"Epoch 18/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.3299 - val_loss: 0.2165\n",
"Epoch 19/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.3230 - val_loss: 0.2203\n",
"Epoch 20/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.3174 - val_loss: 0.2228\n",
"Epoch 21/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.3229 - val_loss: 0.2199\n",
"Epoch 22/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.3097 - val_loss: 0.2113\n",
"Epoch 23/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.3060 - val_loss: 0.2001\n",
"Epoch 24/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2952 - val_loss: 0.2033\n",
"Epoch 25/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2955 - val_loss: 0.2049\n",
"Epoch 26/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2999 - val_loss: 0.2018\n",
"Epoch 27/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2936 - val_loss: 0.2079\n",
"Epoch 28/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2943 - val_loss: 0.1961\n",
"Epoch 29/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2901 - val_loss: 0.1948\n",
"Epoch 30/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2918 - val_loss: 0.1929\n",
"Epoch 31/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2802 - val_loss: 0.1882\n",
"Epoch 32/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2786 - val_loss: 0.1965\n",
"Epoch 33/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2751 - val_loss: 0.1895\n",
"Epoch 34/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2730 - val_loss: 0.1844\n",
"Epoch 35/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2728 - val_loss: 0.1929\n",
"Epoch 36/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2813 - val_loss: 0.1927\n",
"Epoch 37/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2734 - val_loss: 0.1855\n",
"Epoch 38/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2753 - val_loss: 0.1895\n",
"Epoch 39/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2750 - val_loss: 0.1871\n",
"Epoch 40/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2707 - val_loss: 0.1931\n",
"Epoch 41/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2745 - val_loss: 0.1934\n",
"Epoch 42/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2711 - val_loss: 0.1844\n",
"Epoch 43/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2674 - val_loss: 0.1845\n",
"Epoch 44/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2537 - val_loss: 0.1781\n",
"Epoch 45/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2529 - val_loss: 0.1764\n",
"Epoch 46/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2489 - val_loss: 0.1733\n",
"Epoch 47/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2517 - val_loss: 0.1776\n",
"Epoch 48/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2542 - val_loss: 0.1678\n",
"Epoch 49/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2470 - val_loss: 0.1675\n",
"Epoch 50/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2428 - val_loss: 0.1702\n",
"Epoch 51/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2467 - val_loss: 0.1689\n",
"Epoch 52/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2514 - val_loss: 0.1695\n",
"Epoch 53/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2501 - val_loss: 0.1695\n",
"Epoch 54/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2479 - val_loss: 0.1770\n",
"Epoch 55/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2458 - val_loss: 0.1741\n",
"Epoch 56/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2492 - val_loss: 0.1691\n",
"Epoch 57/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2510 - val_loss: 0.1726\n",
"Epoch 58/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2435 - val_loss: 0.1710\n",
"Epoch 59/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2466 - val_loss: 0.1704\n",
"Epoch 60/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2441 - val_loss: 0.1644\n",
"Epoch 61/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2380 - val_loss: 0.1648\n",
"Epoch 62/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2260 - val_loss: 0.1596\n",
"Epoch 63/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2237 - val_loss: 0.1573\n",
"Epoch 64/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2214 - val_loss: 0.1591\n",
"Epoch 65/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2203 - val_loss: 0.1556\n",
"Epoch 66/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2166 - val_loss: 0.1609\n",
"Epoch 67/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2192 - val_loss: 0.1551\n",
"Epoch 68/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2168 - val_loss: 0.1566\n",
"Epoch 69/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2166 - val_loss: 0.1576\n",
"Epoch 70/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2176 - val_loss: 0.1571\n",
"Epoch 71/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2196 - val_loss: 0.1595\n",
"Epoch 72/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2161 - val_loss: 0.1603\n",
"Epoch 73/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2182 - val_loss: 0.1606\n",
"Epoch 74/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2206 - val_loss: 0.1590\n",
"Epoch 75/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2150 - val_loss: 0.1584\n",
"Epoch 76/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2163 - val_loss: 0.1580\n",
"Epoch 77/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2132 - val_loss: 0.1549\n",
"Epoch 78/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2116 - val_loss: 0.1519\n",
"Epoch 79/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2063 - val_loss: 0.1536\n",
"Epoch 80/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2107 - val_loss: 0.1499\n",
"Epoch 81/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2054 - val_loss: 0.1481\n",
"Epoch 82/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1988 - val_loss: 0.1499\n",
"Epoch 83/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2005 - val_loss: 0.1510\n",
"Epoch 84/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2032 - val_loss: 0.1476\n",
"Epoch 85/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1957 - val_loss: 0.1483\n",
"Epoch 86/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1989 - val_loss: 0.1514\n",
"Epoch 87/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1980 - val_loss: 0.1490\n",
"Epoch 88/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1974 - val_loss: 0.1489\n",
"Epoch 89/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2023 - val_loss: 0.1480\n",
"Epoch 90/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1981 - val_loss: 0.1491\n",
"Epoch 91/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2008 - val_loss: 0.1461\n",
"Epoch 92/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1994 - val_loss: 0.1446\n",
"Epoch 93/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1910 - val_loss: 0.1444\n",
"Epoch 94/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1914 - val_loss: 0.1420\n",
"Epoch 95/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1959 - val_loss: 0.1479\n",
"Epoch 96/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1977 - val_loss: 0.1453\n",
"Epoch 97/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2003 - val_loss: 0.1439\n",
"Epoch 98/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.2025 - val_loss: 0.1450\n",
"Epoch 99/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1938 - val_loss: 0.1400\n",
"Epoch 100/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1940 - val_loss: 0.1375\n",
"Epoch 101/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1872 - val_loss: 0.1380\n",
"Epoch 102/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1838 - val_loss: 0.1366\n",
"Epoch 103/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1879 - val_loss: 0.1398\n",
"Epoch 104/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1898 - val_loss: 0.1424\n",
"Epoch 105/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1855 - val_loss: 0.1353\n",
"Epoch 106/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1819 - val_loss: 0.1345\n",
"Epoch 107/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1805 - val_loss: 0.1382\n",
"Epoch 108/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1772 - val_loss: 0.1357\n",
"Epoch 109/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1783 - val_loss: 0.1344\n",
"Epoch 110/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1807 - val_loss: 0.1328\n",
"Epoch 111/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1825 - val_loss: 0.1322\n",
"Epoch 112/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1828 - val_loss: 0.1330\n",
"Epoch 113/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1831 - val_loss: 0.1341\n",
"Epoch 114/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1857 - val_loss: 0.1335\n",
"Epoch 115/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1868 - val_loss: 0.1354\n",
"Epoch 116/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1859 - val_loss: 0.1385\n",
"Epoch 117/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1882 - val_loss: 0.1345\n",
"Epoch 118/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1893 - val_loss: 0.1339\n",
"Epoch 119/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1832 - val_loss: 0.1346\n",
"Epoch 120/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1858 - val_loss: 0.1345\n",
"Epoch 121/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1844 - val_loss: 0.1352\n",
"Epoch 122/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1839 - val_loss: 0.1320\n",
"Epoch 123/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1809 - val_loss: 0.1306\n",
"Epoch 124/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1765 - val_loss: 0.1324\n",
"Epoch 125/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1740 - val_loss: 0.1306\n",
"Epoch 126/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1728 - val_loss: 0.1283\n",
"Epoch 127/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1690 - val_loss: 0.1271\n",
"Epoch 128/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1667 - val_loss: 0.1293\n",
"Epoch 129/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1688 - val_loss: 0.1290\n",
"Epoch 130/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1658 - val_loss: 0.1283\n",
"Epoch 131/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1662 - val_loss: 0.1303\n",
"Epoch 132/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1648 - val_loss: 0.1278\n",
"Epoch 133/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1668 - val_loss: 0.1289\n",
"Epoch 134/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1673 - val_loss: 0.1276\n",
"Epoch 135/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1729 - val_loss: 0.1288\n",
"Epoch 136/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1686 - val_loss: 0.1269\n",
"Epoch 137/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1680 - val_loss: 0.1268\n",
"Epoch 138/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1699 - val_loss: 0.1316\n",
"Epoch 139/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1695 - val_loss: 0.1311\n",
"Epoch 140/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1679 - val_loss: 0.1283\n",
"Epoch 141/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1647 - val_loss: 0.1295\n",
"Epoch 142/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1721 - val_loss: 0.1253\n",
"Epoch 143/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1723 - val_loss: 0.1275\n",
"Epoch 144/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1707 - val_loss: 0.1291\n",
"Epoch 145/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1657 - val_loss: 0.1255\n",
"Epoch 146/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1611 - val_loss: 0.1257\n",
"Epoch 147/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1606 - val_loss: 0.1227\n",
"Epoch 148/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1596 - val_loss: 0.1247\n",
"Epoch 149/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1627 - val_loss: 0.1229\n",
"Epoch 150/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1612 - val_loss: 0.1236\n",
"Epoch 151/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1662 - val_loss: 0.1230\n",
"Epoch 152/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1591 - val_loss: 0.1203\n",
"Epoch 153/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1587 - val_loss: 0.1177\n",
"Epoch 154/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1591 - val_loss: 0.1204\n",
"Epoch 155/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1650 - val_loss: 0.1237\n",
"Epoch 156/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1646 - val_loss: 0.1213\n",
"Epoch 157/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1591 - val_loss: 0.1220\n",
"Epoch 158/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1621 - val_loss: 0.1211\n",
"Epoch 159/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1588 - val_loss: 0.1255\n",
"Epoch 160/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1627 - val_loss: 0.1240\n",
"Epoch 161/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1590 - val_loss: 0.1230\n",
"Epoch 162/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1598 - val_loss: 0.1218\n",
"Epoch 163/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1562 - val_loss: 0.1224\n",
"Epoch 164/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1614 - val_loss: 0.1247\n",
"Epoch 165/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1625 - val_loss: 0.1212\n",
"Epoch 166/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1536 - val_loss: 0.1214\n",
"Epoch 167/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1555 - val_loss: 0.1202\n",
"Epoch 168/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1558 - val_loss: 0.1172\n",
"Epoch 169/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1552 - val_loss: 0.1165\n",
"Epoch 170/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1515 - val_loss: 0.1176\n",
"Epoch 171/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1467 - val_loss: 0.1159\n",
"Epoch 172/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1443 - val_loss: 0.1181\n",
"Epoch 173/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1478 - val_loss: 0.1184\n",
"Epoch 174/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1470 - val_loss: 0.1168\n",
"Epoch 175/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1530 - val_loss: 0.1152\n",
"Epoch 176/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1531 - val_loss: 0.1175\n",
"Epoch 177/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1541 - val_loss: 0.1184\n",
"Epoch 178/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1548 - val_loss: 0.1199\n",
"Epoch 179/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1526 - val_loss: 0.1168\n",
"Epoch 180/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1522 - val_loss: 0.1172\n",
"Epoch 181/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1508 - val_loss: 0.1164\n",
"Epoch 182/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1515 - val_loss: 0.1198\n",
"Epoch 183/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1570 - val_loss: 0.1167\n",
"Epoch 184/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1537 - val_loss: 0.1178\n",
"Epoch 185/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1509 - val_loss: 0.1163\n",
"Epoch 186/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1507 - val_loss: 0.1184\n",
"Epoch 187/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1496 - val_loss: 0.1172\n",
"Epoch 188/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1496 - val_loss: 0.1135\n",
"Epoch 189/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1475 - val_loss: 0.1163\n",
"Epoch 190/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1481 - val_loss: 0.1143\n",
"Epoch 191/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1483 - val_loss: 0.1172\n",
"Epoch 192/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1463 - val_loss: 0.1141\n",
"Epoch 193/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1435 - val_loss: 0.1157\n",
"Epoch 194/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1439 - val_loss: 0.1121\n",
"Epoch 195/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1499 - val_loss: 0.1130\n",
"Epoch 196/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1436 - val_loss: 0.1121\n",
"Epoch 197/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1421 - val_loss: 0.1142\n",
"Epoch 198/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1437 - val_loss: 0.1116\n",
"Epoch 199/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1399 - val_loss: 0.1109\n",
"Epoch 200/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1438 - val_loss: 0.1147\n",
"Epoch 201/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1500 - val_loss: 0.1136\n",
"Epoch 202/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1493 - val_loss: 0.1130\n",
"Epoch 203/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1512 - val_loss: 0.1148\n",
"Epoch 204/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1480 - val_loss: 0.1167\n",
"Epoch 205/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1515 - val_loss: 0.1108\n",
"Epoch 206/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1455 - val_loss: 0.1141\n",
"Epoch 207/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1446 - val_loss: 0.1141\n",
"Epoch 208/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1457 - val_loss: 0.1164\n",
"Epoch 209/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1452 - val_loss: 0.1125\n",
"Epoch 210/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1412 - val_loss: 0.1148\n",
"Epoch 211/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1475 - val_loss: 0.1159\n",
"Epoch 212/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1427 - val_loss: 0.1200\n",
"Epoch 213/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1423 - val_loss: 0.1156\n",
"Epoch 214/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1434 - val_loss: 0.1132\n",
"Epoch 215/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1426 - val_loss: 0.1123\n",
"Epoch 216/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1387 - val_loss: 0.1121\n",
"Epoch 217/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1342 - val_loss: 0.1148\n",
"Epoch 218/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1421 - val_loss: 0.1169\n",
"Epoch 219/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1442 - val_loss: 0.1182\n",
"Epoch 220/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1389 - val_loss: 0.1128\n",
"Epoch 221/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1420 - val_loss: 0.1155\n",
"Epoch 222/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1471 - val_loss: 0.1159\n",
"Epoch 223/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1476 - val_loss: 0.1216\n",
"Epoch 224/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1488 - val_loss: 0.1155\n",
"Epoch 225/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1480 - val_loss: 0.1150\n",
"Epoch 226/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1415 - val_loss: 0.1134\n",
"Epoch 227/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1445 - val_loss: 0.1136\n",
"Epoch 228/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1384 - val_loss: 0.1123\n",
"Epoch 229/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1396 - val_loss: 0.1126\n",
"Epoch 230/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1424 - val_loss: 0.1137\n",
"Epoch 231/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1415 - val_loss: 0.1144\n",
"Epoch 232/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1389 - val_loss: 0.1142\n",
"Epoch 233/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1415 - val_loss: 0.1140\n",
"Epoch 234/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1379 - val_loss: 0.1164\n",
"Epoch 235/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1374 - val_loss: 0.1166\n",
"Epoch 236/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1434 - val_loss: 0.1172\n",
"Epoch 237/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1369 - val_loss: 0.1124\n",
"Epoch 238/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1379 - val_loss: 0.1138\n",
"Epoch 239/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1393 - val_loss: 0.1117\n",
"Epoch 240/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1400 - val_loss: 0.1105\n",
"Epoch 241/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1443 - val_loss: 0.1092\n",
"Epoch 242/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1377 - val_loss: 0.1113\n",
"Epoch 243/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1410 - val_loss: 0.1131\n",
"Epoch 244/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1364 - val_loss: 0.1153\n",
"Epoch 245/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1383 - val_loss: 0.1076\n",
"Epoch 246/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1341 - val_loss: 0.1117\n",
"Epoch 247/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1349 - val_loss: 0.1083\n",
"Epoch 248/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1332 - val_loss: 0.1081\n",
"Epoch 249/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1363 - val_loss: 0.1073\n",
"Epoch 250/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1369 - val_loss: 0.1078\n",
"Epoch 251/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1316 - val_loss: 0.1127\n",
"Epoch 252/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1286 - val_loss: 0.1096\n",
"Epoch 253/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1336 - val_loss: 0.1122\n",
"Epoch 254/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1315 - val_loss: 0.1106\n",
"Epoch 255/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1302 - val_loss: 0.1069\n",
"Epoch 256/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1282 - val_loss: 0.1087\n",
"Epoch 257/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1272 - val_loss: 0.1086\n",
"Epoch 258/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1264 - val_loss: 0.1073\n",
"Epoch 259/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1276 - val_loss: 0.1075\n",
"Epoch 260/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1319 - val_loss: 0.1077\n",
"Epoch 261/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1297 - val_loss: 0.1072\n",
"Epoch 262/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1298 - val_loss: 0.1056\n",
"Epoch 263/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1297 - val_loss: 0.1064\n",
"Epoch 264/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1267 - val_loss: 0.1044\n",
"Epoch 265/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1245 - val_loss: 0.1057\n",
"Epoch 266/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1249 - val_loss: 0.1049\n",
"Epoch 267/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1274 - val_loss: 0.1059\n",
"Epoch 268/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1255 - val_loss: 0.1095\n",
"Epoch 269/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1275 - val_loss: 0.1100\n",
"Epoch 270/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1274 - val_loss: 0.1063\n",
"Epoch 271/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1278 - val_loss: 0.1110\n",
"Epoch 272/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1265 - val_loss: 0.1055\n",
"Epoch 273/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1256 - val_loss: 0.1076\n",
"Epoch 274/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1299 - val_loss: 0.1076\n",
"Epoch 275/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1248 - val_loss: 0.1089\n",
"Epoch 276/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1263 - val_loss: 0.1069\n",
"Epoch 277/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1290 - val_loss: 0.1060\n",
"Epoch 278/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1261 - val_loss: 0.1066\n",
"Epoch 279/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1273 - val_loss: 0.1065\n",
"Epoch 280/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1294 - val_loss: 0.1074\n",
"Epoch 281/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1297 - val_loss: 0.1072\n",
"Epoch 282/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1353 - val_loss: 0.1058\n",
"Epoch 283/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1284 - val_loss: 0.1066\n",
"Epoch 284/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1287 - val_loss: 0.1073\n",
"Epoch 285/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1325 - val_loss: 0.1071\n",
"Epoch 286/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1315 - val_loss: 0.1054\n",
"Epoch 287/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1275 - val_loss: 0.1058\n",
"Epoch 288/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1274 - val_loss: 0.1053\n",
"Epoch 289/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1271 - val_loss: 0.1057\n",
"Epoch 290/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1270 - val_loss: 0.1043\n",
"Epoch 291/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1264 - val_loss: 0.1054\n",
"Epoch 292/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1315 - val_loss: 0.1054\n",
"Epoch 293/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1305 - val_loss: 0.1073\n",
"Epoch 294/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1290 - val_loss: 0.1074\n",
"Epoch 295/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1325 - val_loss: 0.1056\n",
"Epoch 296/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1289 - val_loss: 0.1078\n",
"Epoch 297/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1288 - val_loss: 0.1036\n",
"Epoch 298/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1287 - val_loss: 0.1037\n",
"Epoch 299/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1272 - val_loss: 0.1030\n",
"Epoch 300/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1237 - val_loss: 0.1047\n",
"Epoch 301/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1267 - val_loss: 0.1052\n",
"Epoch 302/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1232 - val_loss: 0.1011\n",
"Epoch 303/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1212 - val_loss: 0.1016\n",
"Epoch 304/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1206 - val_loss: 0.1048\n",
"Epoch 305/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1237 - val_loss: 0.1043\n",
"Epoch 306/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1208 - val_loss: 0.1014\n",
"Epoch 307/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1223 - val_loss: 0.1033\n",
"Epoch 308/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1214 - val_loss: 0.1049\n",
"Epoch 309/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1204 - val_loss: 0.1044\n",
"Epoch 310/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1257 - val_loss: 0.1055\n",
"Epoch 311/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1230 - val_loss: 0.1067\n",
"Epoch 312/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1241 - val_loss: 0.1056\n",
"Epoch 313/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1252 - val_loss: 0.1029\n",
"Epoch 314/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1212 - val_loss: 0.1043\n",
"Epoch 315/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1255 - val_loss: 0.1002\n",
"Epoch 316/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1202 - val_loss: 0.1013\n",
"Epoch 317/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1165 - val_loss: 0.1017\n",
"Epoch 318/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1154 - val_loss: 0.1025\n",
"Epoch 319/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1180 - val_loss: 0.0999\n",
"Epoch 320/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1212 - val_loss: 0.1014\n",
"Epoch 321/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1230 - val_loss: 0.1029\n",
"Epoch 322/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1189 - val_loss: 0.1019\n",
"Epoch 323/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1181 - val_loss: 0.0993\n",
"Epoch 324/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1196 - val_loss: 0.0992\n",
"Epoch 325/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1141 - val_loss: 0.1004\n",
"Epoch 326/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1135 - val_loss: 0.0979\n",
"Epoch 327/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1182 - val_loss: 0.0979\n",
"Epoch 328/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1201 - val_loss: 0.1013\n",
"Epoch 329/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1216 - val_loss: 0.0996\n",
"Epoch 330/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1224 - val_loss: 0.1012\n",
"Epoch 331/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1241 - val_loss: 0.0979\n",
"Epoch 332/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1206 - val_loss: 0.1023\n",
"Epoch 333/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1221 - val_loss: 0.0991\n",
"Epoch 334/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1203 - val_loss: 0.0987\n",
"Epoch 335/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1205 - val_loss: 0.1010\n",
"Epoch 336/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1218 - val_loss: 0.1022\n",
"Epoch 337/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1202 - val_loss: 0.1020\n",
"Epoch 338/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1182 - val_loss: 0.0988\n",
"Epoch 339/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1179 - val_loss: 0.0989\n",
"Epoch 340/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1166 - val_loss: 0.0997\n",
"Epoch 341/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1177 - val_loss: 0.1004\n",
"Epoch 342/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1166 - val_loss: 0.1000\n",
"Epoch 343/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1127 - val_loss: 0.1005\n",
"Epoch 344/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1201 - val_loss: 0.0978\n",
"Epoch 345/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1180 - val_loss: 0.0961\n",
"Epoch 346/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1131 - val_loss: 0.0970\n",
"Epoch 347/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1154 - val_loss: 0.0970\n",
"Epoch 348/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1133 - val_loss: 0.0980\n",
"Epoch 349/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1167 - val_loss: 0.0968\n",
"Epoch 350/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1133 - val_loss: 0.0970\n",
"Epoch 351/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1186 - val_loss: 0.0997\n",
"Epoch 352/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1153 - val_loss: 0.0969\n",
"Epoch 353/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1175 - val_loss: 0.0991\n",
"Epoch 354/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1165 - val_loss: 0.1015\n",
"Epoch 355/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1152 - val_loss: 0.0990\n",
"Epoch 356/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1170 - val_loss: 0.0996\n",
"Epoch 357/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1176 - val_loss: 0.0980\n",
"Epoch 358/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1175 - val_loss: 0.1019\n",
"Epoch 359/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1151 - val_loss: 0.0994\n",
"Epoch 360/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1155 - val_loss: 0.1009\n",
"Epoch 361/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1121 - val_loss: 0.1005\n",
"Epoch 362/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1142 - val_loss: 0.0992\n",
"Epoch 363/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1125 - val_loss: 0.1015\n",
"Epoch 364/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1129 - val_loss: 0.0998\n",
"Epoch 365/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1142 - val_loss: 0.0992\n",
"Epoch 366/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1126 - val_loss: 0.1016\n",
"Epoch 367/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1132 - val_loss: 0.1001\n",
"Epoch 368/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1143 - val_loss: 0.0994\n",
"Epoch 369/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1173 - val_loss: 0.1013\n",
"Epoch 370/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1173 - val_loss: 0.1008\n",
"Epoch 371/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1186 - val_loss: 0.0993\n",
"Epoch 372/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1181 - val_loss: 0.0991\n",
"Epoch 373/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1119 - val_loss: 0.0982\n",
"Epoch 374/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1089 - val_loss: 0.0990\n",
"Epoch 375/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1077 - val_loss: 0.0979\n",
"Epoch 376/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1054 - val_loss: 0.0965\n",
"Epoch 377/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1052 - val_loss: 0.0949\n",
"Epoch 378/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1066 - val_loss: 0.0954\n",
"Epoch 379/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1067 - val_loss: 0.0941\n",
"Epoch 380/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1065 - val_loss: 0.0939\n",
"Epoch 381/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1057 - val_loss: 0.0952\n",
"Epoch 382/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1037 - val_loss: 0.0952\n",
"Epoch 383/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1050 - val_loss: 0.0976\n",
"Epoch 384/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1072 - val_loss: 0.0928\n",
"Epoch 385/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1068 - val_loss: 0.0942\n",
"Epoch 386/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1068 - val_loss: 0.0960\n",
"Epoch 387/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1038 - val_loss: 0.0978\n",
"Epoch 388/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1103 - val_loss: 0.0949\n",
"Epoch 389/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1062 - val_loss: 0.0962\n",
"Epoch 390/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1083 - val_loss: 0.0981\n",
"Epoch 391/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1122 - val_loss: 0.0948\n",
"Epoch 392/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1133 - val_loss: 0.0935\n",
"Epoch 393/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1101 - val_loss: 0.0951\n",
"Epoch 394/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1084 - val_loss: 0.0968\n",
"Epoch 395/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1081 - val_loss: 0.0967\n",
"Epoch 396/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1100 - val_loss: 0.0973\n",
"Epoch 397/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1085 - val_loss: 0.0964\n",
"Epoch 398/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1080 - val_loss: 0.1006\n",
"Epoch 399/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1075 - val_loss: 0.0955\n",
"Epoch 400/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1082 - val_loss: 0.0972\n",
"Epoch 401/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1070 - val_loss: 0.1010\n",
"Epoch 402/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1121 - val_loss: 0.0994\n",
"Epoch 403/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1095 - val_loss: 0.0996\n",
"Epoch 404/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1084 - val_loss: 0.0955\n",
"Epoch 405/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1067 - val_loss: 0.0954\n",
"Epoch 406/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1056 - val_loss: 0.0966\n",
"Epoch 407/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1069 - val_loss: 0.0948\n",
"Epoch 408/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1076 - val_loss: 0.0967\n",
"Epoch 409/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1092 - val_loss: 0.0973\n",
"Epoch 410/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1047 - val_loss: 0.0983\n",
"Epoch 411/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1067 - val_loss: 0.0967\n",
"Epoch 412/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1055 - val_loss: 0.0976\n",
"Epoch 413/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1062 - val_loss: 0.0966\n",
"Epoch 414/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1028 - val_loss: 0.0975\n",
"Epoch 415/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1036 - val_loss: 0.0958\n",
"Epoch 416/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1054 - val_loss: 0.0962\n",
"Epoch 417/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1056 - val_loss: 0.0973\n",
"Epoch 418/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1027 - val_loss: 0.0965\n",
"Epoch 419/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1076 - val_loss: 0.0987\n",
"Epoch 420/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1061 - val_loss: 0.0948\n",
"Epoch 421/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1068 - val_loss: 0.0956\n",
"Epoch 422/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1057 - val_loss: 0.0960\n",
"Epoch 423/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1054 - val_loss: 0.0988\n",
"Epoch 424/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1064 - val_loss: 0.1003\n",
"Epoch 425/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1087 - val_loss: 0.0976\n",
"Epoch 426/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1017 - val_loss: 0.0975\n",
"Epoch 427/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1035 - val_loss: 0.0958\n",
"Epoch 428/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1028 - val_loss: 0.0968\n",
"Epoch 429/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1036 - val_loss: 0.0976\n",
"Epoch 430/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1006 - val_loss: 0.0947\n",
"Epoch 431/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1045 - val_loss: 0.0962\n",
"Epoch 432/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1031 - val_loss: 0.0966\n",
"Epoch 433/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1070 - val_loss: 0.0945\n",
"Epoch 434/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1060 - val_loss: 0.0924\n",
"Epoch 435/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1015 - val_loss: 0.0933\n",
"Epoch 436/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1038 - val_loss: 0.0941\n",
"Epoch 437/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1003 - val_loss: 0.0948\n",
"Epoch 438/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1018 - val_loss: 0.0946\n",
"Epoch 439/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1055 - val_loss: 0.0965\n",
"Epoch 440/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.0987 - val_loss: 0.0933\n",
"Epoch 441/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1033 - val_loss: 0.0956\n",
"Epoch 442/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1012 - val_loss: 0.0963\n",
"Epoch 443/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1029 - val_loss: 0.0938\n",
"Epoch 444/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1030 - val_loss: 0.0962\n",
"Epoch 445/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1038 - val_loss: 0.0932\n",
"Epoch 446/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1058 - val_loss: 0.0943\n",
"Epoch 447/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1006 - val_loss: 0.0937\n",
"Epoch 448/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1047 - val_loss: 0.0927\n",
"Epoch 449/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1050 - val_loss: 0.0928\n",
"Epoch 450/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1017 - val_loss: 0.0926\n",
"Epoch 451/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1024 - val_loss: 0.0939\n",
"Epoch 452/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1012 - val_loss: 0.0945\n",
"Epoch 453/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.0999 - val_loss: 0.0933\n",
"Epoch 454/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1045 - val_loss: 0.0933\n",
"Epoch 455/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1010 - val_loss: 0.0940\n",
"Epoch 456/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1045 - val_loss: 0.0943\n",
"Epoch 457/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1045 - val_loss: 0.0934\n",
"Epoch 458/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1002 - val_loss: 0.0945\n",
"Epoch 459/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1025 - val_loss: 0.0949\n",
"Epoch 460/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1019 - val_loss: 0.0927\n",
"Epoch 461/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1028 - val_loss: 0.0920\n",
"Epoch 462/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1060 - val_loss: 0.0907\n",
"Epoch 463/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1033 - val_loss: 0.0902\n",
"Epoch 464/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1004 - val_loss: 0.0920\n",
"Epoch 465/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1052 - val_loss: 0.0947\n",
"Epoch 466/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1067 - val_loss: 0.0945\n",
"Epoch 467/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1051 - val_loss: 0.0947\n",
"Epoch 468/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1085 - val_loss: 0.0947\n",
"Epoch 469/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1080 - val_loss: 0.0960\n",
"Epoch 470/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1093 - val_loss: 0.0942\n",
"Epoch 471/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1071 - val_loss: 0.0920\n",
"Epoch 472/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1030 - val_loss: 0.0935\n",
"Epoch 473/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1043 - val_loss: 0.0933\n",
"Epoch 474/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1020 - val_loss: 0.0943\n",
"Epoch 475/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1056 - val_loss: 0.0955\n",
"Epoch 476/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1001 - val_loss: 0.0962\n",
"Epoch 477/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.0998 - val_loss: 0.0944\n",
"Epoch 478/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1013 - val_loss: 0.0953\n",
"Epoch 479/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1032 - val_loss: 0.0941\n",
"Epoch 480/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.0999 - val_loss: 0.0930\n",
"Epoch 481/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1007 - val_loss: 0.0931\n",
"Epoch 482/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.0976 - val_loss: 0.0916\n",
"Epoch 483/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1049 - val_loss: 0.0907\n",
"Epoch 484/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1046 - val_loss: 0.0948\n",
"Epoch 485/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1059 - val_loss: 0.0935\n",
"Epoch 486/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1030 - val_loss: 0.0917\n",
"Epoch 487/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1004 - val_loss: 0.0915\n",
"Epoch 488/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.0997 - val_loss: 0.0929\n",
"Epoch 489/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.0996 - val_loss: 0.0920\n",
"Epoch 490/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.0986 - val_loss: 0.0923\n",
"Epoch 491/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.1005 - val_loss: 0.0936\n",
"Epoch 492/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.0987 - val_loss: 0.0911\n",
"Epoch 493/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.0970 - val_loss: 0.0915\n",
"Epoch 494/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.0996 - val_loss: 0.0909\n",
"Epoch 495/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.1003 - val_loss: 0.0924\n",
"Epoch 496/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.0957 - val_loss: 0.0900\n",
"Epoch 497/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.0926 - val_loss: 0.0895\n",
"Epoch 498/500\n",
"42000/42000 [==============================] - 0s 10us/step - loss: 0.0944 - val_loss: 0.0896\n",
"Epoch 499/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.0943 - val_loss: 0.0898\n",
"Epoch 500/500\n",
"42000/42000 [==============================] - 0s 9us/step - loss: 0.0956 - val_loss: 0.0889\n"
]
},
{
"data": {
"text/plain": [
"0.08254869665252045"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"model.fit(X_train,Y_train,batch_size=512,epochs=500,shuffle=True,verbose=1,validation_split=0.3)\n",
"model.evaluate(X_test, Y_test, batch_size=200, verbose=0)\n",
" \n"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"test set\n",
"\n",
"The test loss is 0.082549\n",
"\n",
"\n",
"The accuracy of the model is 0.975000\n"
]
}
],
"source": [
"'''\n",
" 5、アウトプット\n",
"'''\n",
"print(\"test set\")\n",
"scores = model.evaluate(X_test,Y_test,batch_size=200,verbose=0)\n",
"print(\"\")\n",
"print(\"The test loss is %f\" % scores)\n",
"result = model.predict(X_test,batch_size=200,verbose=0)\n",
" \n",
"result_max = numpy.argmax(result, axis = 1)\n",
"test_max = numpy.argmax(Y_test, axis = 1)\n",
" \n",
"result_bool = numpy.equal(result_max, test_max)\n",
"true_num = numpy.sum(result_bool)\n",
"print(\"\")\n",
"print(\"\")\n",
"print(\"The accuracy of the model is %f\" % (true_num/len(result_bool)))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Keras Code",
"language": "python",
"name": "dswipython"
},
"language_info": {
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment