Created
January 4, 2018 10:58
-
-
Save zackenton/30c76ce514f30240d680267b2e803a4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"Using TensorFlow backend.\n" | |
] | |
} | |
], | |
"source": [ | |
"import tensorflow\n", | |
"import os\n", | |
"os.environ['KERAS_BACKEND'] = 'tensorflow'\n", | |
"import numpy as np\n", | |
"from keras.models import Sequential \n", | |
"from keras.layers import Dense, Activation, Reshape, Flatten\n", | |
"from keras.utils import np_utils \n", | |
"from keras import backend as K\n", | |
"from keras.datasets import mnist \n", | |
"from sklearn.model_selection import train_test_split\n", | |
"import matplotlib.pyplot as plt\n", | |
"from keras.callbacks import TensorBoard, LambdaCallback\n", | |
"from keras.utils import np_utils \n", | |
"from keras.preprocessing.image import ImageDataGenerator\n", | |
"import datetime\n", | |
"from keras.optimizers import SGD" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 120, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"def compute_hessian_stats(epoch, logs):\n", | |
" if epoch%10==0:\n", | |
" print(epoch)\n", | |
" p = model.predict_proba(X_bin_train).reshape(-1,)\n", | |
" W = np.diag(p*(1-p))\n", | |
" H = X_bin_train.transpose().dot(W).dot(X_bin_train)\n", | |
" w, v = np.linalg.eig(H)\n", | |
" logs['largest_eigenvalue'] = np.max(w)\n", | |
" logs['det'] = np.prod(w)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 67, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"def compute_hessian_stats_2(epoch, logs):\n", | |
" if epoch%10==0:\n", | |
" print(epoch)\n", | |
" idx = np.random.randint(len(X_bin_train), size=3)\n", | |
" randX = X_bin_train[idx]\n", | |
"# randX = randX.reshape(len(randX),-1)\n", | |
"# print(randX)\n", | |
" p = model.predict_proba(randX).reshape(-1,)\n", | |
" W = np.diag(p*(1-p))\n", | |
"# H = randX.transpose().dot(W).dot(randX)\n", | |
"# w, v = np.linalg.eig(H)\n", | |
"# logs['largest_eigenvalue'] = np.max(w)\n", | |
"# logs['det'] = np.prod(w)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 152, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(12665, 28, 28, 1)" | |
] | |
}, | |
"execution_count": 152, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"X_bin_train.shape" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 162, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"_________________________________________________________________\n", | |
"Layer (type) Output Shape Param # \n", | |
"=================================================================\n", | |
"flatten_11 (Flatten) (None, 784) 0 \n", | |
"_________________________________________________________________\n", | |
"dense_11 (Dense) (None, 1) 785 \n", | |
"=================================================================\n", | |
"Total params: 785\n", | |
"Trainable params: 785\n", | |
"Non-trainable params: 0\n", | |
"_________________________________________________________________\n" | |
] | |
} | |
], | |
"source": [ | |
"model.summary()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 165, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import keras.backend as K" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 163, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"array([ 0., 1., 1., 1., 1.], dtype=float32)" | |
] | |
}, | |
"execution_count": 163, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"p = model.predict_proba(X_bin_train[:5])\n", | |
"p = p.reshape(-1,)\n", | |
"p" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 130, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"array([ 0., 1., 1., 1., 1.], dtype=float32)" | |
] | |
}, | |
"execution_count": 130, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"p" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 119, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"array([[ 2., 3.]], dtype=float32)" | |
] | |
}, | |
"execution_count": 119, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"c = np.array([[2,3]]).astype(\"float32\")\n", | |
"c" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 124, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"c = c.flatten()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 125, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"array([[ 2., 0.],\n", | |
" [ 0., 3.]], dtype=float32)" | |
] | |
}, | |
"execution_count": 125, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"np.diag(c)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 164, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"array([[ 0., 0., 0., 0., 0.],\n", | |
" [ 0., 1., 0., 0., 0.],\n", | |
" [ 0., 0., 1., 0., 0.],\n", | |
" [ 0., 0., 0., 1., 0.],\n", | |
" [ 0., 0., 0., 0., 1.]], dtype=float32)" | |
] | |
}, | |
"execution_count": 164, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"np.diag(p)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 134, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"array([[ 0., 0., 0., 0., 0.],\n", | |
" [ 0., 0., 0., 0., 0.],\n", | |
" [ 0., 0., 0., 0., 0.],\n", | |
" [ 0., 0., 0., 0., 0.],\n", | |
" [ 0., 0., 0., 0., 0.]], dtype=float32)" | |
] | |
}, | |
"execution_count": 134, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"W = np.diag(p*(1-p))\n", | |
"W" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 88, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"array([0, 1, 1, ..., 1, 0, 1], dtype=uint8)" | |
] | |
}, | |
"execution_count": 88, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"y_bin_train" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 149, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"[<tf.Tensor 'dense_4/Sigmoid:0' shape=(?, 1) dtype=float32>]" | |
] | |
}, | |
"execution_count": 149, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"model.outputs" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Control" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# the data, shuffled and split between train and test sets \n", | |
"(X_train, y_train), (X_test, y_test) = mnist.load_data()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"X_train = X_train.reshape(X_train.shape[0], 28, 28, 1)\n", | |
"X_test = X_test.reshape(X_test.shape[0], 28, 28, 1)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"input_dim = 784 #28*28 \n", | |
"X_train = X_train.astype('float32') \n", | |
"X_test = X_test.astype('float32') \n", | |
"X_train /= 255 \n", | |
"X_test /= 255" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# define data preparation\n", | |
"datagen = ImageDataGenerator()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"datagen.fit(X_train)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"nb_classes = 10\n", | |
"y_train = np_utils.to_categorical(y_train, nb_classes) \n", | |
"y_test = np_utils.to_categorical(y_test, nb_classes)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"input_dim = 784 #28*28 \n", | |
"output_dim = nb_classes = 10 \n", | |
"model = Sequential() \n", | |
"model.add(Flatten(input_shape=X_train.shape[1:]))\n", | |
"model.add(Dense(output_dim, activation='softmax')) \n", | |
"batch_size = 128 \n", | |
"nb_epoch = 20\n", | |
"lr = 0.1" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"name = datetime.datetime.now().isoformat() + \"control\"\n", | |
"c = {\"lr\": 0.1, \"bs\": batch_size, \"momentum\": 0.9}\n", | |
"name += \"lr=\" + str(c['lr'])\n", | |
"name += \"m=\" + str(c['momentum'])\n", | |
"name += \"bs=\" + str(c['bs'])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"callbacks = []\n", | |
"callbacks.append(TensorBoard(log_dir=\"logreg_ex/\" + name))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"model.compile(optimizer=SGD(lr=c['lr'], momentum=c['momentum']), loss='categorical_crossentropy', metrics=['accuracy']) " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<keras.callbacks.History at 0x127d8ecf8>" | |
] | |
}, | |
"execution_count": 12, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"model.fit_generator(datagen.flow(X_train, y_train, batch_size=batch_size),\n", | |
" steps_per_epoch=len(X_train) / batch_size, \n", | |
" epochs=nb_epoch, \n", | |
" verbose=0,\n", | |
" validation_data=(X_test, y_test), \n", | |
" callbacks=callbacks)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Whitened" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 25, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# the data, shuffled and split between train and test sets \n", | |
"(X_train, y_train), (X_test, y_test) = mnist.load_data()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 26, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"X_train = X_train.reshape(X_train.shape[0], 28, 28, 1)\n", | |
"X_test = X_test.reshape(X_test.shape[0], 28, 28, 1)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 27, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"input_dim = 784 #28*28 \n", | |
"X_train = X_train.astype('float32') \n", | |
"X_test = X_test.astype('float32') \n", | |
"X_train /= 255 \n", | |
"X_test /= 255" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 28, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# define data preparation\n", | |
"datagen = ImageDataGenerator(zca_whitening=True)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 29, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"datagen.fit(X_train)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 30, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"nb_classes = 10\n", | |
"y_train = np_utils.to_categorical(y_train, nb_classes) \n", | |
"y_test = np_utils.to_categorical(y_test, nb_classes)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 31, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"input_dim = 784 #28*28 \n", | |
"output_dim = nb_classes = 10 \n", | |
"model = Sequential() \n", | |
"model.add(Flatten(input_shape=X_train.shape[1:]))\n", | |
"model.add(Dense(output_dim, activation='softmax')) \n", | |
"batch_size = 128 \n", | |
"nb_epoch = 20" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 32, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"name = datetime.datetime.now().isoformat() + \"whitened\"\n", | |
"c = {\"lr\": 0.1, \"bs\": 10, \"momentum\": 0.9}\n", | |
"name += \"lr=\" + str(c['lr'])\n", | |
"name += \"m=\" + str(c['momentum'])\n", | |
"name += \"bs=\" + str(c['bs'])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 33, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"callbacks = []\n", | |
"callbacks.append(TensorBoard(log_dir=\"logreg_ex/\" + name))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 34, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"model.compile(optimizer=SGD(lr=c['lr'], momentum=c['momentum']), loss='categorical_crossentropy', metrics=['accuracy']) " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 35, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"(10000, 28, 28, 1)\n", | |
"(10000, 28, 28, 1)\n" | |
] | |
} | |
], | |
"source": [ | |
"# whiten test according to the training set whitening transform\n", | |
"print(X_test.shape)\n", | |
"for i in range(len(X_test)):\n", | |
" X_test[i] = datagen.standardize(X_test[i])\n", | |
"print(X_test.shape)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 36, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Epoch 1/20\n", | |
"469/468 [==============================] - 12s 27ms/step - loss: 0.7408 - acc: 0.8344 - val_loss: 0.6017 - val_acc: 0.8753\n", | |
"Epoch 2/20\n", | |
"469/468 [==============================] - 11s 23ms/step - loss: 0.5890 - acc: 0.8827 - val_loss: 0.5769 - val_acc: 0.8883\n", | |
"Epoch 3/20\n", | |
"469/468 [==============================] - 14s 30ms/step - loss: 0.5603 - acc: 0.8922 - val_loss: 0.5870 - val_acc: 0.8930\n", | |
"Epoch 4/20\n", | |
"469/468 [==============================] - 10s 22ms/step - loss: 0.5573 - acc: 0.8945 - val_loss: 0.5932 - val_acc: 0.8951\n", | |
"Epoch 5/20\n", | |
"469/468 [==============================] - 10s 21ms/step - loss: 0.5398 - acc: 0.8985 - val_loss: 0.5974 - val_acc: 0.8967\n", | |
"Epoch 6/20\n", | |
"469/468 [==============================] - 13s 29ms/step - loss: 0.5462 - acc: 0.8993 - val_loss: 0.5918 - val_acc: 0.8973\n", | |
"Epoch 7/20\n", | |
"469/468 [==============================] - 12s 25ms/step - loss: 0.5414 - acc: 0.9008 - val_loss: 0.6129 - val_acc: 0.8977\n", | |
"Epoch 8/20\n", | |
"469/468 [==============================] - 13s 29ms/step - loss: 0.5272 - acc: 0.9036 - val_loss: 0.5995 - val_acc: 0.8991\n", | |
"Epoch 9/20\n", | |
"469/468 [==============================] - 10s 20ms/step - loss: 0.5261 - acc: 0.9033 - val_loss: 0.5825 - val_acc: 0.9035\n", | |
"Epoch 10/20\n", | |
"469/468 [==============================] - 12s 25ms/step - loss: 0.5214 - acc: 0.9069 - val_loss: 0.5931 - val_acc: 0.9003\n", | |
"Epoch 11/20\n", | |
"469/468 [==============================] - 12s 25ms/step - loss: 0.5200 - acc: 0.9074 - val_loss: 0.6045 - val_acc: 0.9025\n", | |
"Epoch 12/20\n", | |
"469/468 [==============================] - 8s 17ms/step - loss: 0.5170 - acc: 0.9086 - val_loss: 0.6061 - val_acc: 0.9026\n", | |
"Epoch 13/20\n", | |
"469/468 [==============================] - 7s 15ms/step - loss: 0.5132 - acc: 0.9088 - val_loss: 0.5808 - val_acc: 0.9042\n", | |
"Epoch 14/20\n", | |
"469/468 [==============================] - 7s 15ms/step - loss: 0.5156 - acc: 0.9107 - val_loss: 0.6118 - val_acc: 0.9028\n", | |
"Epoch 15/20\n", | |
"469/468 [==============================] - 11s 23ms/step - loss: 0.5057 - acc: 0.9109 - val_loss: 0.6154 - val_acc: 0.9022\n", | |
"Epoch 16/20\n", | |
"469/468 [==============================] - 8s 17ms/step - loss: 0.5045 - acc: 0.9117 - val_loss: 0.6180 - val_acc: 0.9026\n", | |
"Epoch 17/20\n", | |
"469/468 [==============================] - 13s 27ms/step - loss: 0.5091 - acc: 0.9113 - val_loss: 0.6094 - val_acc: 0.9044\n", | |
"Epoch 18/20\n", | |
"469/468 [==============================] - 14s 29ms/step - loss: 0.5093 - acc: 0.9120 - val_loss: 0.5996 - val_acc: 0.9052\n", | |
"Epoch 19/20\n", | |
"469/468 [==============================] - 11s 24ms/step - loss: 0.5116 - acc: 0.9110 - val_loss: 0.6362 - val_acc: 0.9011\n", | |
"Epoch 20/20\n", | |
"469/468 [==============================] - 11s 23ms/step - loss: 0.4987 - acc: 0.9132 - val_loss: 0.6071 - val_acc: 0.9062\n" | |
] | |
}, | |
{ | |
"data": { | |
"text/plain": [ | |
"<keras.callbacks.History at 0x137552c50>" | |
] | |
}, | |
"execution_count": 36, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"model.fit_generator(datagen.flow(X_train, y_train, batch_size=batch_size),\n", | |
" steps_per_epoch=len(X_train) / batch_size, \n", | |
" epochs=nb_epoch, \n", | |
" validation_data=(X_test, y_test), \n", | |
" callbacks=callbacks)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"collapsed": true | |
}, | |
"source": [ | |
"# Two digit MNIST: binary logistic regression" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 119, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# the data, shuffled and split between train and test sets \n", | |
"(X_train, y_train), (X_test, y_test) = mnist.load_data()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 120, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(60000, 28, 28)" | |
] | |
}, | |
"execution_count": 120, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"X_train.shape" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 121, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"zeros_train = y_train == 0 \n", | |
"ones_train = y_train == 1\n", | |
"mask_train = [any(tup) for tup in zip(zeros_train, ones_train)]\n", | |
"\n", | |
"X_bin_train = X_train[mask_train]\n", | |
"y_bin_train = y_train[mask_train]\n", | |
"\n", | |
"zeros_test = y_test == 0 \n", | |
"ones_test = y_test == 1\n", | |
"mask_test = [any(tup) for tup in zip(zeros_test, ones_test)]\n", | |
"\n", | |
"X_bin_test = X_test[mask_test]\n", | |
"y_bin_test = y_test[mask_test]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 122, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"X_bin_train = X_bin_train.reshape(X_bin_train.shape[0], 28, 28, 1)\n", | |
"X_bin_test = X_bin_test.reshape(X_bin_test.shape[0], 28, 28, 1)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 123, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"input_dim = 784 #28*28 \n", | |
"X_train = X_train.astype('float32') \n", | |
"X_test = X_test.astype('float32') \n", | |
"X_train /= 255 \n", | |
"X_test /= 255" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 124, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# define data preparation\n", | |
"datagen = ImageDataGenerator(zca_whitening=True)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 125, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"datagen.fit(X_bin_train)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 126, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAVEAAAEICAYAAADm98d9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXm8XVV5/r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VpseAqR0aVrfB5dqfcLk2\nCXcsDYMQwmTgJ8DxMcbnbFus2EA8NqwH4XLtT3RSru38iD4KzDB/b1A91nUIIaxERSA/iDFeXD38\neNX+IjvMsk6Nr8vgcu1PuFybRDs/ojcDs0IIG4cQVgYOBS5t4/2bQqgkp/xPYEGM8QzTdCnw0erv\nHwUuaffYuhQu1/6Ey7XZMbQ5Fd7+wP8DJgDnxBi/3LabN4kQwu7Ab4A7ARX0OZmKneVHwIbAw8DB\nMcanOzLILoPLtT/hcm1yDL7t0+FwOEYPdyw5HA5HC/CPqMPhcLQA/4g6HA5HC/CPqMPhcLQA/4g6\nHA5HC/CPqMPhcLQA/4g6HA5HC/j/W4KrxDincoUAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x135f21588>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"for X_batch, y_batch in datagen.flow(X_bin_train, y_bin_train, batch_size=9):\n", | |
" # create a grid of 3x3 images\n", | |
" for i in range(0, 9):\n", | |
" plt.subplot(330 + 1 + i)\n", | |
" plt.title(\"{0}\".format(y_batch[i]))\n", | |
" plt.imshow(X_batch[i].reshape(28, 28), cmap=plt.get_cmap('gray'))\n", | |
" # show the plot\n", | |
" plt.show()\n", | |
" break" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 127, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# nb_classes = 2\n", | |
"# y_bin_train = np_utils.to_categorical(y_bin_train, nb_classes) \n", | |
"# y_bin_test = np_utils.to_categorical(y_bin_test, nb_classes)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 128, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"input_dim = 784 #28*28 \n", | |
"# output_dim = nb_classes \n", | |
"model = Sequential() \n", | |
"model.add(Flatten(input_shape=X_bin_train.shape[1:]))\n", | |
"model.add(Dense(1, input_dim=784, activation='sigmoid')) \n", | |
"batch_size = 64 \n", | |
"nb_epoch = 20" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 129, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"name = datetime.datetime.now().isoformat() + \"whitened_binary\"\n", | |
"c = {\"lr\": 0.1, \"bs\": batch_size, \"momentum\": 0.9}\n", | |
"name += \"lr=\" + str(c['lr'])\n", | |
"name += \"m=\" + str(c['momentum'])\n", | |
"name += \"bs=\" + str(c['bs'])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 130, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"callbacks = []\n", | |
"# callbacks.append(LambdaCallback(on_epoch_end=compute_hessian_stats_2))\n", | |
"callbacks.append(TensorBoard(log_dir=\"new/\" + name))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 131, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"model.compile(optimizer=SGD(lr=c['lr'], momentum=c['momentum']), loss='binary_crossentropy', metrics=['accuracy']) " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 132, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"(2115, 28, 28, 1)\n", | |
"(2115, 28, 28, 1)\n" | |
] | |
} | |
], | |
"source": [ | |
"# whiten test according to the training set whitening transform\n", | |
"print(X_bin_test.shape)\n", | |
"for i in range(len(X_bin_test)):\n", | |
" X_bin_test[i] = datagen.standardize(X_bin_test[i])\n", | |
"print(X_bin_test.shape)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 133, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"'2018-01-03T18:00:45.316153whitened_binarylr=0.1m=0.9bs=64'" | |
] | |
}, | |
"execution_count": 133, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"name" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 134, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Epoch 1/20\n", | |
"198/197 [==============================] - 5s 23ms/step - loss: 0.1591 - acc: 0.9636 - val_loss: 3.2950 - val_acc: 0.7934\n", | |
"Epoch 2/20\n", | |
"198/197 [==============================] - 4s 22ms/step - loss: 0.0672 - acc: 0.9921 - val_loss: 3.0727 - val_acc: 0.8061\n", | |
"Epoch 3/20\n", | |
"198/197 [==============================] - 4s 21ms/step - loss: 0.0488 - acc: 0.9931 - val_loss: 3.3909 - val_acc: 0.7882\n", | |
"Epoch 4/20\n", | |
"198/197 [==============================] - 5s 23ms/step - loss: 0.0393 - acc: 0.9957 - val_loss: 3.2591 - val_acc: 0.7948\n", | |
"Epoch 5/20\n", | |
"198/197 [==============================] - 5s 23ms/step - loss: 0.0337 - acc: 0.9976 - val_loss: 3.2963 - val_acc: 0.7939\n", | |
"Epoch 6/20\n", | |
"198/197 [==============================] - 5s 24ms/step - loss: 0.0311 - acc: 0.9979 - val_loss: 3.2629 - val_acc: 0.7962\n", | |
"Epoch 7/20\n", | |
"198/197 [==============================] - 5s 23ms/step - loss: 0.0285 - acc: 0.9982 - val_loss: 3.3642 - val_acc: 0.7887\n", | |
"Epoch 8/20\n", | |
"198/197 [==============================] - 4s 22ms/step - loss: 0.0269 - acc: 0.9981 - val_loss: 3.4124 - val_acc: 0.7863\n", | |
"Epoch 9/20\n", | |
"198/197 [==============================] - 4s 22ms/step - loss: 0.0269 - acc: 0.9983 - val_loss: 3.4178 - val_acc: 0.7863\n", | |
"Epoch 10/20\n", | |
"198/197 [==============================] - 4s 22ms/step - loss: 0.0261 - acc: 0.9983 - val_loss: 3.4138 - val_acc: 0.7858\n", | |
"Epoch 11/20\n", | |
"198/197 [==============================] - 3s 16ms/step - loss: 0.0259 - acc: 0.9984 - val_loss: 3.4029 - val_acc: 0.7872\n", | |
"Epoch 12/20\n", | |
"198/197 [==============================] - 3s 15ms/step - loss: 0.0258 - acc: 0.9984 - val_loss: 3.3989 - val_acc: 0.7877\n", | |
"Epoch 13/20\n", | |
"198/197 [==============================] - 3s 17ms/step - loss: 0.0258 - acc: 0.9984 - val_loss: 3.4019 - val_acc: 0.7872\n", | |
"Epoch 14/20\n", | |
"198/197 [==============================] - 3s 16ms/step - loss: 0.0257 - acc: 0.9984 - val_loss: 3.4006 - val_acc: 0.7872\n", | |
"Epoch 15/20\n", | |
"198/197 [==============================] - 3s 14ms/step - loss: 0.0257 - acc: 0.9984 - val_loss: 3.3970 - val_acc: 0.7877\n", | |
"Epoch 16/20\n", | |
"198/197 [==============================] - 4s 21ms/step - loss: 0.0257 - acc: 0.9984 - val_loss: 3.3977 - val_acc: 0.7877\n", | |
"Epoch 17/20\n", | |
"198/197 [==============================] - 3s 17ms/step - loss: 0.0256 - acc: 0.9984 - val_loss: 3.3963 - val_acc: 0.7877\n", | |
"Epoch 18/20\n", | |
"198/197 [==============================] - 3s 17ms/step - loss: 0.0256 - acc: 0.9984 - val_loss: 3.3960 - val_acc: 0.7872\n", | |
"Epoch 19/20\n", | |
"198/197 [==============================] - 4s 19ms/step - loss: 0.0256 - acc: 0.9984 - val_loss: 3.3946 - val_acc: 0.7877\n", | |
"Epoch 20/20\n", | |
"198/197 [==============================] - 2s 12ms/step - loss: 0.0256 - acc: 0.9984 - val_loss: 3.3916 - val_acc: 0.7872\n" | |
] | |
}, | |
{ | |
"data": { | |
"text/plain": [ | |
"<keras.callbacks.History at 0x12472ab38>" | |
] | |
}, | |
"execution_count": 134, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"model.fit_generator(datagen.flow(X_bin_train, y_bin_train, batch_size=batch_size),\n", | |
" steps_per_epoch=len(X_bin_train) / batch_size, \n", | |
" epochs=nb_epoch, \n", | |
" validation_data=(X_bin_test, y_bin_test), \n", | |
" callbacks=callbacks\n", | |
" )" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"collapsed": true | |
}, | |
"source": [ | |
"# Non-whitened" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 135, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# the data, shuffled and split between train and test sets \n", | |
"(X_train, y_train), (X_test, y_test) = mnist.load_data()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 136, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(60000, 28, 28)" | |
] | |
}, | |
"execution_count": 136, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"X_train.shape" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 137, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"zeros_train = y_train == 0 \n", | |
"ones_train = y_train == 1\n", | |
"mask_train = [any(tup) for tup in zip(zeros_train, ones_train)]\n", | |
"\n", | |
"X_bin_train = X_train[mask_train]\n", | |
"y_bin_train = y_train[mask_train]\n", | |
"\n", | |
"zeros_test = y_test == 0 \n", | |
"ones_test = y_test == 1\n", | |
"mask_test = [any(tup) for tup in zip(zeros_test, ones_test)]\n", | |
"\n", | |
"X_bin_test = X_test[mask_test]\n", | |
"y_bin_test = y_test[mask_test]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 138, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"0.53233320173707066" | |
] | |
}, | |
"execution_count": 138, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"sum(ones_train)/(sum(zeros_train)+sum(ones_train))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 139, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"X_bin_train = X_bin_train.reshape(X_bin_train.shape[0], 28, 28, 1)\n", | |
"X_bin_test = X_bin_test.reshape(X_bin_test.shape[0], 28, 28, 1)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 140, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"input_dim = 784 #28*28 \n", | |
"X_train = X_train.astype('float32') \n", | |
"X_test = X_test.astype('float32') \n", | |
"X_train /= 255 \n", | |
"X_test /= 255" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 141, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# define data preparation\n", | |
"datagen = ImageDataGenerator()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 142, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"datagen.fit(X_bin_train)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 143, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAVEAAAEICAYAAADm98d9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm0FNW1x/HvFnDEAUSJAk8cgCUSH8YhRk1EESVqogaD\nolFMjEaNRkwcAPHFeYxmUKMSQwAFwUSNqFE0RMARRYwxgAJhOaCAqBjACZHz/ug+1dV36Fvd1V3d\nXff3WYvV1aequw53Q919qs5gzjlERKQ0G1S7AiIi9UwXURGRGHQRFRGJQRdREZEYdBEVEYlBF1ER\nkRh0ERURiSH1F1EzO9vMZpvZ52Y2ttr1kfIxs45m9oCZfWxmb5rZCdWuk8RXb3FtW+0KJOBd4Erg\nMGCTKtdFyutWYC3Q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nbbrstAMuXLw/K\nvvzyyyaPve2224Lt4cMzo+M+/vjjCtZOojj00EODbR+Xgw46CID169cH+7p1yzyEfvfddxOsnbRG\nykRFRGJoFZloz549AXjqqaeA/OwznL2E/eQnPwm2P/nkEwCuvTYzneLKlZpuMmnHHHMMABMnTgzK\n2rVrB+Ri2NRD0hNPPBGANWvWAPDggw9WtJ5Smr59+wbbjz/+OABbb701ABtskMv1+vXrB8CMGTOS\nq1wLlImKiMSgi6iISAypbc7vueeewfY999wDQIcOHUr6rvPOOw+AdevWAXDTTTcF+z744INSqygF\ndOrUCYChQ4cCcOmllwK5JnxLXnzxRSDXJPS3cPzDKICbb765LHWV+I46Kjffs/9/6m/TPP3008G+\n1157LdmKRaBMVEQkhtRlogcccAAAt9xyS1DWvXv3snz3BRdcAICZBWU33HADoIdN5XbkkUcCcN11\n1+WV+9YAwM9+9jMgF48BAwYE+w477DAA2rZtm/d69dVXB8f4z/3ud78ra92lvPz/aYBevXoB+d0U\nq02ZqIhIDKnJRH3XB5+59O4dbdWDFStWADBz5kwABg0a1OJnzj///GDbd7lRJhrfkCFDgu3wfWeA\nuXMz82TcfvvtQdno0aPzjrnjjjuC7bfeegvIdbbfeeedAdhkk02CY0477TRAmajEo0xURCQGXURF\nRGJosTlvZmOAI4H3nHN9smUdgclAd+ANYLBzrirtWd+Mv+aaawDYY489WvyMf0AEuea8v1EdpTmf\nBrUUV9+lZeTIkUHZFltsAcCnn34K5LomPfroo5G+098a8N8zadIkADbbbLPgGN+0992p3n///dL+\nAjWmlmLbGkTJRMcCAxuUDQemOed6ANOy76W+jEVxTauxKLaJaTETdc7NNLPuDYqPAvplt8cB04GL\nylivJvXp0wfIf7Cz6667AtEy0HPOOQfIfwDhhbvHFOPKK68E4OSTTwZg1apVhQ6vGbUUV/+AyMcS\nchnoiBEjgOgZqPfMM8/kvR81ahQAv/71r4My3/XtpJNOarSvntVSbKMKdxsMj5UHGD9+fLDtHwDX\nklKfznd2zi3Nbi8DOjd3oJZgrS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5PdXg3MB7qQqeu47GHjyARK\nFNe0UlwjSvIi2gV4O/R+SbasZplZd2APYBbQ2Tm3NLtrGdC5StWqNYprOimuEenBUjPMrD1wHzDM\nObcqvM9l7oGob1gdUlzTqZpxTfIi+g7QLfS+a7as5phZOzIBmeCcuz9bvDx7/8Xfh3mvWvWrMYpr\nOimuESV5EX0R6GFmO5rZhsDxwJQEzx+JmRnwR2C+c+6m0K4pwNDs9lDgwaTrVqMU13RSXKPWIeHV\nPg8HfgO0AcY4565K7OQRmdkBwFPAq8D6bPFIMvdZ7gX+B3gTGOyc+7Aqlawxims6Ka4R66BhnyIi\npdODJRGRGHQRFRGJQRdREZEYdBEVEYlBF1ERkRh0ERURiUEXURGRGP4fbAIyWWv8KvIAAAAASUVO\nRK5CYII=\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x13d01bfd0>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"for X_batch, y_batch in datagen.flow(X_bin_train, y_bin_train, batch_size=9):\n", | |
" # create a grid of 3x3 images\n", | |
" for i in range(0, 9):\n", | |
" plt.subplot(330 + 1 + i)\n", | |
" plt.title(\"{0}\".format(y_batch[i]))\n", | |
" plt.imshow(X_batch[i].reshape(28, 28), cmap=plt.get_cmap('gray'))\n", | |
" # show the plot\n", | |
" plt.show()\n", | |
" break" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 144, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# nb_classes = 2\n", | |
"# y_bin_train = np_utils.to_categorical(y_bin_train, nb_classes) \n", | |
"# y_bin_test = np_utils.to_categorical(y_bin_test, nb_classes)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 145, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"input_dim = 784 #28*28 \n", | |
"# output_dim = nb_classes \n", | |
"model = Sequential() \n", | |
"model.add(Flatten(input_shape=X_bin_train.shape[1:]))\n", | |
"model.add(Dense(1, input_dim=784, activation='sigmoid')) \n", | |
"batch_size = 64 \n", | |
"nb_epoch = 20" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 146, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"name = datetime.datetime.now().isoformat() + \"binary\"\n", | |
"c = {\"lr\": 0.1, \"bs\": batch_size, \"momentum\": 0.9}\n", | |
"name += \"lr=\" + str(c['lr'])\n", | |
"name += \"m=\" + str(c['momentum'])\n", | |
"name += \"bs=\" + str(c['bs'])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 147, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"callbacks = []\n", | |
"# callbacks.append(LambdaCallback(on_epoch_end=compute_hessian_stats_2))\n", | |
"callbacks.append(TensorBoard(log_dir=\"new/\" + name))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 148, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"model.compile(optimizer=SGD(lr=c['lr'], momentum=c['momentum']), loss='binary_crossentropy', metrics=['accuracy']) " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 149, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"(2115, 28, 28, 1)\n", | |
"(2115, 28, 28, 1)\n" | |
] | |
} | |
], | |
"source": [ | |
"# whiten test according to the training set whitening transform\n", | |
"print(X_bin_test.shape)\n", | |
"for i in range(len(X_bin_test)):\n", | |
" X_bin_test[i] = datagen.standardize(X_bin_test[i])\n", | |
"print(X_bin_test.shape)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 150, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"'2018-01-03T18:02:13.299865binarylr=0.1m=0.9bs=64'" | |
] | |
}, | |
"execution_count": 150, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"name" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 151, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Epoch 1/20\n", | |
"198/197 [==============================] - 1s 4ms/step - loss: 0.7691 - acc: 0.9520 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 2/20\n", | |
"198/197 [==============================] - 0s 2ms/step - loss: 0.1680 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 3/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1678 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 4/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1680 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 5/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1680 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 6/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1678 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 7/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1678 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915: 0s - loss: 0.1706 - acc: 0.98\n", | |
"Epoch 8/20\n", | |
"198/197 [==============================] - 0s 2ms/step - loss: 0.1678 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 9/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1680 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 10/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1680 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 11/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1678 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 12/20\n", | |
"198/197 [==============================] - 0s 2ms/step - loss: 0.1678 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 13/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1678 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 14/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1678 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 15/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1678 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 16/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1683 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 17/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1678 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 18/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1678 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 19/20\n", | |
"198/197 [==============================] - 0s 3ms/step - loss: 0.1680 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n", | |
"Epoch 20/20\n", | |
"198/197 [==============================] - 1s 3ms/step - loss: 0.1682 - acc: 0.9896 - val_loss: 0.1372 - val_acc: 0.9915\n" | |
] | |
}, | |
{ | |
"data": { | |
"text/plain": [ | |
"<keras.callbacks.History at 0x123737f98>" | |
] | |
}, | |
"execution_count": 151, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"model.fit_generator(datagen.flow(X_bin_train, y_bin_train, batch_size=batch_size),\n", | |
" steps_per_epoch=len(X_bin_train) / batch_size, \n", | |
" epochs=nb_epoch, \n", | |
" validation_data=(X_bin_test, y_bin_test), \n", | |
" callbacks=callbacks\n", | |
" )" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"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.5.4" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment