{"cells":[{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"afa1f816-8fdb-48ba-1742-3d4fcb1342a0"},"outputs":[],"source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load in \n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the \"../input/\" directory.\n# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory\n\nfrom subprocess import check_output\nprint(check_output([\"ls\", \"../input\"]).decode(\"utf8\"))\n\n# Any results you write to the current directory are saved as output."},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"1b9dc68e-cea1-ee1c-f0b0-2f3d0373d2d2"},"outputs":[],"source":"%matplotlib inline\nimport matplotlib.pyplot as plt\nimport tensorflow as tf\nimport numpy as np\nfrom sklearn.metrics import confusion_matrix\nimport time\nfrom datetime import timedelta\nimport math\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimage"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"46ffec2b-c6c1-ed3c-6f74-4433deaa39a6"},"outputs":[],"source":""},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"d3865510-8deb-3738-8e54-f11c9f5a8128"},"outputs":[],"source":"\n# Convolutional Layer 1.\n#When dealing with high-dimensional inputs such as images, \n#it is impractical to connect neurons to all neurons in the previous volume. \n#Instead, we will connect each neuron to only a local region of the input volume. \n#The spatial extent of this connectivity is a hyperparameter called the receptive field \n#of the neuron (equivalently this is the filter size). \n#smaller size than input\nfilter_size1 = 5          # Convolution filters are 5 x 5 pixels.\nnum_filters1 = 16         # There are 16 of these filters.\n\n#more filters, featuer map will b\n# Convolutional Layer 2.\nfilter_size2 = 5          # Convolution filters are 5 x 5 pixels.\nnum_filters2 = 36         # There are 36 of these filters.\n\n# Fully-connected layer.\nfc_size = 128             # Number of neurons in fully-connected layer."},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"2df5fe0f-ab33-b66c-2644-b66b61de70ac"},"outputs":[],"source":"from subprocess import check_output\nprint(check_output([\"ls\", \"../input\"]).decode(\"utf8\"))"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"a5d9c35d-9af7-251b-9db7-fd0ee7fd7801"},"outputs":[],"source":"img_data = mpimage.imread('../input/train/Type_1/0.jpg')"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"300b134c-47f3-4d0f-9d3b-eac203d53a37"},"outputs":[],"source":"import glob\ntrain_image_filenames = sorted(glob.glob(\"../input/train.7z\"))\nprint(\"Found images:\")\nprint (train_image_filenames)"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"31ab3fdc-6b9e-6a7d-5e70-c610c187ce06"},"outputs":[],"source":""}],"metadata":{"_change_revision":0,"_is_fork":false,"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.6.0"}},"nbformat":4,"nbformat_minor":0}