{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#jupyter notebook needs to be started with prefix KERAS_BACKEND=theano\n", "import theano\n", "import keras\n", "from keras.models import Sequential\n", "from keras.layers import Dense, Dropout, Flatten #Dropout not used yet\n", "from keras.layers import Conv2D, MaxPooling2D #does not know when to use MaxPooling yet\n", "from keras.losses import categorical_crossentropy #loss function normally used for classification problems, some other can be tried\n", "from keras.optimizers import adam #very powerful optimizer (link to an article comparing it to others)\n", "from keras.callbacks import EarlyStopping #to stop the algorithm sooner if the cnn does not improve for some time\n", " #it is inevitable to explain the concept of callback\n", "from keras.callbacks import History #for tracing the loss\n", "from keras.utils import to_categorical #needed for converting labels into a good format\n", "\n", " \n", "import numpy as np\n", "import pandas as pd #for data handling\n", "from sklearn.preprocessing import OneHotEncoder\n", "\n", "import matplotlib.pyplot as plt\n", "import sklearn as sk\n", "from sklearn.preprocessing import MinMaxScaler #for MinMaxScaler()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.0" } }, "nbformat": 4, "nbformat_minor": 2 }