{"cells":[{"metadata":{"id":"uZf25afkfrRe","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"outputId":"aa3bb132-ab6a-4960-981d-a8cd47f3e05e","trusted":true,"_uuid":"e9b1f6baa29dd3dbd277fabaede36d3cd455544a"},"cell_type":"code","source":"# import all of library used\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib\nimport seaborn as sns\nsns.set()\n\nfrom sklearn.model_selection import train_test_split, KFold\n\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Dropout, Flatten\n# from keras.utils import np_utils  # fonctionality like get_dummies of pandas\nfrom keras.layers.convolutional import Conv2D, MaxPooling2D\nfrom keras import backend as K\nK.set_image_dim_ordering('tf') # to change the shape of image is (samples, width, height, channels)\nfrom keras.optimizers import RMSprop\nfrom keras.preprocessing.image import ImageDataGenerator\nfrom keras.callbacks import ReduceLROnPlateau # changing learing rate while training data\nfrom keras.layers.normalization import BatchNormalization\n\n\n# load data from keras\nfrom keras.datasets import mnist\n\n%matplotlib inline\nplt.rcParams['figure.figsize'] = [16, 8]","execution_count":null,"outputs":[]},{"metadata":{"id":"ugdLGN3KttQx","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"outputId":"11e7e5ea-bf11-4fb7-c556-48064df3c790","trusted":true,"_uuid":"b606c5b7e8d6730864e0ddfa20a5f2337bd868db"},"cell_type":"code","source":"import os\nos.listdir(\"../input/\")","execution_count":null,"outputs":[]},{"metadata":{"id":"YSgtEuy5gY4S","colab_type":"code","colab":{},"trusted":true,"_uuid":"7affc78a9b2faf5be93f8e7090ff6182a43671f2"},"cell_type":"code","source":"# load data set\ntrain_kaggle = pd.read_csv(\"../input/train.csv\")\ntest_kaggle = pd.read_csv(\"../input/test.csv\")","execution_count":null,"outputs":[]},{"metadata":{"id":"GKyrNjtbayFw","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":51},"outputId":"3adda5dd-4bcc-445e-b820-84064eb38719","trusted":true,"_uuid":"f0a8418df2526e8609e9daa36dc5bd6d12f72507"},"cell_type":"code","source":"print(\"train shape: \", train_kaggle.shape)\nprint(\"test shape: \", test_kaggle.shape)","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"9c7a093d4ba0b96d0dd698cb3285e211deb500c0"},"cell_type":"markdown","source":"**Note:** To get best results and submit on competition, you just change batch_size and epochs. In the kernel, I choose these epochs and batch size to run faster.\n\n**samples = batch size * epochs**"},{"metadata":{"id":"eo9yTeLzOO0q","colab_type":"text","_uuid":"2893e22bfa0a0abae50ce0120156368659b97364"},"cell_type":"markdown","source":"## Train and test MNIST dataset using keras library"},{"metadata":{"id":"aeiaBjQJhAZd","colab_type":"code","colab":{},"trusted":true,"_uuid":"c21690c0538e5f36a30d883759451e7104d61131"},"cell_type":"code","source":"train_target_kaggle = train_kaggle.iloc[:, :1].values\ntrain_kaggle = train_kaggle.iloc[:,1:].values.astype('float32')\ntest_kaggle = test_kaggle.iloc[:,:].values.astype('float32')","execution_count":null,"outputs":[]},{"metadata":{"id":"uBTw5YtlwWOZ","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":59},"outputId":"87c3715b-147f-48a5-d5bf-7b1e0fba5aa2","trusted":true,"_uuid":"7a447d9bfc0105e9035a623f5b67f5dd193de2a8"},"cell_type":"code","source":"# standalize data\n# this ways is normally used in the way of model of machine learning, like LightGBM, SVM...\n'''\nscale = np.max(train_kaggle)\ntrain_kaggle /= scale\ntest_kaggle /= scale\n\nmean = np.std(train_kaggle)\ntrain_kaggle -= mean\ntest_kaggle -= mean\n'''","execution_count":null,"outputs":[]},{"metadata":{"id":"lRcGKDTksCUm","colab_type":"code","colab":{},"trusted":true,"_uuid":"bbcf2960fea765fa0d74869720defb28de7831ea"},"cell_type":"code","source":"# in the case used by CNN, we normalize data by divide 255 (color)\ntrain_kaggle = train_kaggle/255\ntest_kaggle = test_kaggle/255","execution_count":null,"outputs":[]},{"metadata":{"id":"Ukndc17GlmB7","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":51},"outputId":"0e7bc8e2-f9f2-480c-d1eb-484205ef04d6","trusted":true,"_uuid":"c29ae4eef48725acbabc7560f76a4b42fda60f55"},"cell_type":"code","source":"# These 2 ways below to OneHotEncoding of the label that have multiple label, in this case: 0-9 (10 categories)\n#target = np_utils.to_categorical(target)\nprint(\"Before:\", train_target_kaggle.shape)\ntrain_target_kaggle = pd.get_dummies(train_target_kaggle.ravel())\nprint(\"After:\", train_target_kaggle.shape)","execution_count":null,"outputs":[]},{"metadata":{"id":"Qp-Y5xXMu_2G","colab_type":"code","colab":{},"trusted":true,"_uuid":"bab06268b2a9a44df5da991b28faf6c99e24cff4"},"cell_type":"code","source":"# split data into training set and testing set\nX_train, X_val, y_train, y_val = train_test_split(train_kaggle, train_target_kaggle, test_size=0.2, random_state=42)","execution_count":null,"outputs":[]},{"metadata":{"id":"OoOZznPpgJR-","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"outputId":"af3be278-5c2a-4ea3-eb96-2d3690508317","trusted":true,"_uuid":"953ba3ac8435576a7241696a72f82e5e62f3aa8b"},"cell_type":"code","source":"X_train.shape, y_train.shape, X_val.shape, y_val.shape","execution_count":null,"outputs":[]},{"metadata":{"id":"dW6KCV16vVZs","colab_type":"code","colab":{},"trusted":true,"_uuid":"74fdb35394f2e444391739167f2b77ba144db281"},"cell_type":"code","source":"# a function to create input layer, hidden layer and output layer and then fully connected\ndef baseline_model():\n    model = Sequential()\n    model.add(Dense(784,input_dim=784, activation='relu'))\n    model.add(Dense(10, activation='softmax'))\n    \n    model.compile(metrics=['accuracy'], loss='categorical_crossentropy', optimizer=RMSprop(lr=0.001))\n    return model","execution_count":null,"outputs":[]},{"metadata":{"id":"_SvBfHHWvVgX","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":204},"outputId":"fb66b774-b5a7-44c3-8935-f92fa9f495f7","trusted":true,"_uuid":"f8508bbcebe78b0ca55362425ceaa1633dcc0879"},"cell_type":"code","source":"# instance model\nmodel = baseline_model()\nmodel.summary()","execution_count":null,"outputs":[]},{"metadata":{"id":"WG4-vrE7vVjB","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":714},"outputId":"ad71614b-f996-494b-c2e4-b1436a45a194","trusted":true,"_uuid":"599842dba5c61e70f0702f687e2bf51d315c4445"},"cell_type":"code","source":"# instance history to record all of variable of results\nepochs = 35\nhistory = model.fit(X_train, y_train, validation_data=(X_val, y_val), epochs=epochs, batch_size=len(X_train)//epochs, verbose=2)","execution_count":null,"outputs":[]},{"metadata":{"id":"o2AnnJENynJk","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"outputId":"d78f3be0-a120-498a-def0-27a8a8b7e4c2","trusted":true,"_uuid":"ba3a7deef822575e7cc296df80c5654f93b9b7b2"},"cell_type":"code","source":"# show the model performance\nscores = model.evaluate(X_val, y_val, verbose=0)\nprint(\"Baseline Error: %.2f%%\" % (100-scores[1]*100))","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"25f5cfa0ba3db341b65fca4e6395b987e293826e"},"cell_type":"markdown","source":"> The result is good but we should see whether the model is best performmance or not  "},{"metadata":{"id":"chSIou1QtVxN","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":352},"outputId":"b471def6-b5e4-4814-be7c-2045a0266900","trusted":true,"_uuid":"c4230528d0cb4ec8005380ec19eb75e5f697a567"},"cell_type":"code","source":"# plot the accuracy and loss in each process: training and validation\ndef plot_(history):\n    acc = history.history['acc']\n    val_acc = history.history['val_acc']\n\n    loss = history.history['loss']\n    val_loss = history.history['val_loss']\n\n    f, [ax1, ax2] = plt.subplots(1,2)\n    ax1.plot(range(len(acc)), acc, label=\"acc\")\n    ax1.plot(range(len(acc)), val_acc, label=\"val_acc\")\n    ax1.set_title(\"Training Accuracy vs Validation Accuracy\")\n    ax1.legend()\n\n    ax2.plot(range(len(loss)), loss, label=\"loss\")\n    ax2.plot(range(len(loss)), val_loss, label=\"val_loss\")\n    ax2.set_title(\"Training Loss vs Validation Loss\")\n    ax2.legend()\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"8f8269096c23e7bf27eb036d6d57281bef8b7d24"},"cell_type":"code","source":"plot_(history)","execution_count":null,"outputs":[]},{"metadata":{"id":"Efiu99AWWMYa","colab_type":"text","_uuid":"37ab7b82dc9b019fedfd121f0f19e3f8bfa245c7"},"cell_type":"markdown","source":"\n\n> This model have high variance and bias\n\n"},{"metadata":{"id":"Q7wxYIY5zqJo","colab_type":"text","_uuid":"7f9dd3694bc7b613492c5b1cdc3c4c03c9cf8e82"},"cell_type":"markdown","source":"## Simple Convolutional Neutral Network for MNIST"},{"metadata":{"id":"gpt1JT3CtGJp","colab_type":"text","_uuid":"c5175ab9ea88a02636950873a64cd30d9d92db5e"},"cell_type":"markdown","source":"![LeNet-5](https://world4jason.gitbooks.io/research-log/content/deepLearning/CNN/img/lenet.png)"},{"metadata":{"id":"L8QF0D4ySzfp","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"outputId":"1c21ce2d-49c3-45d0-964e-c44b2911b6f5","trusted":true,"_uuid":"7ce7534700c0439e751986cd35b7936e6d99200f"},"cell_type":"code","source":"# rescale the data\nX_train = X_train.reshape(-1,28,28,1)\nX_val = X_val.reshape(-1,28,28,1)\n\nX_train.shape, X_val.shape","execution_count":null,"outputs":[]},{"metadata":{"id":"0CvBPpxd60oi","colab_type":"code","colab":{},"trusted":true,"_uuid":"1bd030da807fb4b8ec65e50737eec8fe19fc9c1c"},"cell_type":"code","source":"\ndef model_baseline_CNN():\n    model = Sequential()\n    model.add(Conv2D(32, (3, 3), input_shape=(28, 28, 1), activation='relu'))\n    model.add(BatchNormalization(axis=1))\n    model.add(Conv2D(32, (3, 3), activation='relu'))\n    model.add(MaxPooling2D(pool_size=(2, 2)))\n    model.add(BatchNormalization(axis=1))\n    model.add(Conv2D(14, (3, 3), activation='relu'))\n    model.add(BatchNormalization(axis=1))\n    model.add(Conv2D(14, (3, 3), activation='relu'))\n    model.add(MaxPooling2D(pool_size=(2, 2)))\n    model.add(Dropout(0.2))\n    model.add(Flatten())\n    model.add(BatchNormalization())\n    model.add(Dense(128, activation='relu'))\n    model.add(BatchNormalization())\n    model.add(Dense(50, activation='relu'))\n    model.add(BatchNormalization())\n    model.add(Dense(10, activation='softmax'))\n    model.compile(metrics=['accuracy'], loss='categorical_crossentropy', optimizer=RMSprop(lr=0.001))\n    return model","execution_count":null,"outputs":[]},{"metadata":{"id":"R778wkAx4T51","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":442},"outputId":"6e3dbdee-3542-4657-99db-e0061b8bcb6f","trusted":true,"_uuid":"1b066bf42356be537f77d003589a93c3a64ab476"},"cell_type":"code","source":"modelCNN = model_baseline_CNN()\nmodelCNN.summary()","execution_count":null,"outputs":[]},{"metadata":{"id":"to9TUB9jzCJe","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":374},"outputId":"416be0fa-4910-4dcb-b49f-abd2a05ce33b","trusted":true,"_uuid":"1c965f4104cba7151539d29dcf8204a2e8000892"},"cell_type":"code","source":"history = modelCNN.fit(X_train, y_train, validation_data=(X_val, y_val), epochs=epochs, batch_size=len(X_train)//epochs, verbose=2)","execution_count":null,"outputs":[]},{"metadata":{"id":"oMp9g5oSGRCf","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":335},"outputId":"c1300a35-ec8e-4bc7-8942-f8195689eff4","trusted":true,"_uuid":"e5d8e9366faa9ebf7e71be0e996c35d24d76741c"},"cell_type":"code","source":"# plot the accuracy and loss in each process: training and validation  \nplot_(history)","execution_count":null,"outputs":[]},{"metadata":{"id":"PjCv2R-CVoAM","colab_type":"text","_uuid":"4172a94f8cd24e7317c443017b5b710bf9a3087d"},"cell_type":"markdown","source":"\n\n> We can see the gap between training line and validation line is nearly, it means that this model have low bias and variance\n\n\n\n"},{"metadata":{"id":"hmAFvWYR0k-b","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"outputId":"3cd832e1-13e3-4ae2-bc82-1860c9ce1030","trusted":true,"_uuid":"5927d8245251ef453860093cf90f44682ec550bf"},"cell_type":"code","source":"score = modelCNN.evaluate(X_val, y_val, verbose=0)\nprint(\"Baseline error %.2f%%\" % (100-score[1]*100))","execution_count":null,"outputs":[]},{"metadata":{"id":"owQAdDlwWg3k","colab_type":"text","_uuid":"4f557cba98286d3dfae86dbabd8da38d18253f28"},"cell_type":"markdown","source":"\n\n> Model improved\n\n"},{"metadata":{"id":"qp8RYU2GGtq3","colab_type":"text","_uuid":"8fe20bb15e8c29ebbd6d9679d9d4b97734b442e9"},"cell_type":"markdown","source":"## Combine data from Kaggle and Keras to train model"},{"metadata":{"id":"4FZUTwz4W5Wo","colab_type":"text","_uuid":"663a8394456afdf651368b51bea722f889ee5bb0"},"cell_type":"markdown","source":"\n\n> We will import more and more data to see how model improve\n\n"},{"metadata":{"id":"vIu-DJKvJL5x","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"outputId":"cf3937fa-e685-4b3c-d6ae-2c167f1616d0","trusted":true,"_uuid":"1ed4819dc94427b49917cd1b4645fb120c45d2bb"},"cell_type":"code","source":"# save kaggle dataset\nX_train_kaggle, X_val_kaggle, y_train_kaggle, y_val_kaggle = X_train, X_val, y_train, y_val\nX_train_kaggle.shape, X_val_kaggle.shape, y_train_kaggle.shape, y_val_kaggle.shape","execution_count":null,"outputs":[]},{"metadata":{"id":"OvYGoSy_Gs9W","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":68},"outputId":"bf1b962a-aa9e-4eaf-b8cd-944666e25a97","trusted":true,"_uuid":"fe53281fe0db40393c8dc69d38a80d194e255a0e"},"cell_type":"code","source":"# load data from keras dataset\n(X_train_keras, y_train_keras), (X_val_keras, y_val_keras) = mnist.load_data()\nX_train_keras.shape, y_train_keras.shape, X_val_keras.shape, y_val_keras.shape","execution_count":null,"outputs":[]},{"metadata":{"id":"sakEILwRGtIV","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"outputId":"640f15e2-6698-476d-f7ec-d4cf7c38aa30","trusted":true,"_uuid":"1f6c43154654bd879fd95a4f67cb30851bf3c314"},"cell_type":"code","source":"# rescale data\nX_train_keras = X_train_keras.reshape(-1,28,28,1).astype('float32')\nX_val_keras = X_val_keras.reshape(-1,28,28,1).astype('float32')\ny_train_keras = pd.get_dummies(y_train_keras)\ny_val_keras = pd.get_dummies(y_val_keras)\nX_train_keras.shape, X_val_keras.shape, y_train_keras.shape, y_val_keras.shape","execution_count":null,"outputs":[]},{"metadata":{"id":"02J1OfiVLiiV","colab_type":"code","colab":{},"trusted":true,"_uuid":"413506822ea03f7f9738051362a6a6178cccf095"},"cell_type":"code","source":"#normalize data\nX_train_keras /= 255\nX_val_keras /= 255","execution_count":null,"outputs":[]},{"metadata":{"id":"GdDCqfgRKns-","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"outputId":"2210e9a9-a886-4285-c341-75c5c08c21fd","trusted":true,"_uuid":"125c5d563df9770f14ba6193adc2a4fc55e717c8"},"cell_type":"code","source":"X_train = np.concatenate((X_train_kaggle, X_train_keras), axis=0)\nX_val = np.concatenate((X_val_kaggle, X_val_keras), axis=0)\ny_train = np.concatenate((y_train_kaggle, y_train_keras), axis=0)\ny_val = np.concatenate((y_val_kaggle, y_val_keras), axis=0)\n\nX_train.shape, X_val.shape, y_train.shape, y_val.shape","execution_count":null,"outputs":[]},{"metadata":{"id":"cgzW8NzbS7nC","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":442},"outputId":"58f1f6a0-56d7-4590-ba9f-67b9807a0178","trusted":true,"_uuid":"e650d53831f27a99cd42e0f59a49115f0e02c7ec"},"cell_type":"code","source":"modelCNN = model_baseline_CNN()\nmodelCNN.summary()","execution_count":null,"outputs":[]},{"metadata":{"id":"OFVFOF_BGtNN","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":1360},"outputId":"b942a297-1927-4932-e9d2-e1348ff6cc89","trusted":true,"_uuid":"15625305b67de81f1e8fdbe961cf526837e0afbb"},"cell_type":"code","source":"# we inscrease epochs and batch size to fit all of data\nhistory = modelCNN.fit(X_train, y_train, validation_data=(X_val, y_val), epochs=epochs, batch_size=len(X_train)//epochs, verbose=2)","execution_count":null,"outputs":[]},{"metadata":{"id":"5jk7-bbtY_Os","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":335},"outputId":"39deba3b-d5b1-48fb-df30-2f7c0649015f","trusted":true,"_uuid":"a129a61e8c1f2bfacea1c54f05bb104490c41d1b"},"cell_type":"code","source":"plot_(history)","execution_count":null,"outputs":[]},{"metadata":{"id":"qojk8dpGZuij","colab_type":"text","_uuid":"a2260f6d1eafa0a6ec169dc78dee5ba2c5df0a9d"},"cell_type":"markdown","source":"\n\n> awesome, model is much more improved by getting more data\n\n"},{"metadata":{"id":"G3Qq3g78GtFS","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":34},"outputId":"52307cf0-4f0f-49e7-cea6-0086277c85ee","trusted":true,"_uuid":"ba9898c5d54d8ced679e13f2e7d9fb257b61aacf"},"cell_type":"code","source":"score = modelCNN.evaluate(X_val, y_val, verbose=0)\nprint(\"Baseline error %.2f%%\" % (100-score[1]*100))","execution_count":null,"outputs":[]},{"metadata":{"id":"7e3kod7JaNl5","colab_type":"text","_uuid":"dbb76f3be1725c6daf63061c52a36e7973536287"},"cell_type":"markdown","source":"\n\n> Good\n\n"},{"metadata":{"id":"UJv3sCDdaKeq","colab_type":"text","_uuid":"dbaeb77f07c86a9d2ca913c3cce73cdc020ad14a"},"cell_type":"markdown","source":"## Adjust learning rate within fitting data"},{"metadata":{"id":"vMoVbw2GiUNb","colab_type":"code","colab":{},"trusted":true,"_uuid":"6159ca0f569dbecbc719788bae2deb94adf686ca"},"cell_type":"code","source":"learning_rate_reduction = ReduceLROnPlateau(monitor='val_acc', \n                                            patience=3, \n                                            verbose=1, \n                                            factor=0.5, \n                                            min_lr=0.00001)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"002efbb803cd0f592301b28bbd35e26128a20c5e"},"cell_type":"code","source":"modelCNN = model_baseline_CNN()\nhistory = modelCNN.fit(X_train, y_train, validation_data=(X_val, y_val), epochs=epochs, batch_size=len(X_train)//epochs, \n                       verbose=2, callbacks=[learning_rate_reduction])","execution_count":null,"outputs":[]},{"metadata":{"id":"rPBUh_wKsdG6","colab_type":"code","colab":{},"trusted":true,"_uuid":"f7b16a5a2a358105b36ffb4c7014e2442900fa19"},"cell_type":"code","source":"plot_(history)","execution_count":null,"outputs":[]},{"metadata":{"id":"eFRtWwjgseW9","colab_type":"code","colab":{},"trusted":true,"_uuid":"8fd7bfd1ce23c5fad68f0bb18aefbfcdfbd15f1b"},"cell_type":"code","source":"score = modelCNN.evaluate(X_val, y_val, verbose=0)\nprint(\"Baseline error %.2f%%\" % (100-score[1]*100))","execution_count":null,"outputs":[]},{"metadata":{"id":"M6e6ZnPNZD1L","colab_type":"text","_uuid":"c57f2f4e66e36536b813e756c68d93fe6675fb4f"},"cell_type":"markdown","source":"## Submission results files to Kaggle competitions"},{"metadata":{"id":"v5DBXOXWGtCS","colab_type":"code","colab":{},"trusted":false,"_uuid":"2e42f3a6f5e2305ff9769c24560488c279e1613c"},"cell_type":"code","source":"# reshape the test set\ntest_kaggle = test_kaggle.reshape(-1,28,28,1).astype('float32')\npred_target = modelCNN.predict(test_kaggle)","execution_count":null,"outputs":[]},{"metadata":{"id":"rH5Md0WoNWCb","colab_type":"code","colab":{},"trusted":false,"_uuid":"afd508e1352336cd074d23eee177dff2dce32803"},"cell_type":"code","source":"pred_target = np.argmax(pred_target, axis=1)","execution_count":null,"outputs":[]},{"metadata":{"id":"rwDVi-z4NWCe","colab_type":"code","colab":{},"trusted":false,"_uuid":"1b9e1691c7c25e0eda83fccc2ee7d8c50cf22dfb"},"cell_type":"code","source":"submit = pd.read_csv(\"../input/sample_submission.csv\")\nsubmit['Label'] = pred_target\nsubmit.to_csv(\"results.csv\", index=False)","execution_count":null,"outputs":[]},{"metadata":{"id":"_yewpD-rGs6Y","colab_type":"code","colab":{},"trusted":false,"_uuid":"9260df15a28bf03e7ae5630d53558e55be863a84"},"cell_type":"code","source":"","execution_count":null,"outputs":[]},{"metadata":{"id":"yY8r2eVcGr-b","colab_type":"code","colab":{},"trusted":false,"_uuid":"326bc24fb61c131dd2af4e5d5d5707a37ad222b9"},"cell_type":"code","source":"","execution_count":null,"outputs":[]},{"metadata":{"id":"GrjykEK37giR","colab_type":"code","colab":{},"trusted":false,"_uuid":"68be543f33b439e9c6984ce5f4df29d97876bea8"},"cell_type":"code","source":"","execution_count":null,"outputs":[]}],"metadata":{"colab":{"name":"CNN for digit-recognizer.ipynb","version":"0.3.2","provenance":[],"toc_visible":true},"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"accelerator":"GPU","language_info":{"name":"python","version":"3.6.6","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat":4,"nbformat_minor":1}