Udacity - Artificial Intelligence Nanodegree Program
AI - Machine Learning Project sin MNIST Database
This project is part of Udacity´s Artificial Intelligence Nanodegree Program. Here you will find my personal solution to the challenge. The following project can be run using a Local Machine or using an external GPU (Solution provided by Amazon Web Services is recommended). Next, you can follow Udacitys instructions to install the neccessary dependencies on a local machine or on AWS.
Note: The same environment is used in several projects, so don´t worry about its name (pmaienv).
- Clone the repository and navigate to the downloaded folder.
git clone https://github.com/pablomateo/MachineLearningMNIST.git
cd MachineLearningMNIST
-
(Optional) If you plan to install TensorFlow with GPU support on your local machine, follow the guide to install the necessary NVIDIA software on your system. If you are using an EC2 GPU instance, you can skip this step.
-
(Optional) If you are running the project on your local machine (and not using AWS), create (and activate) a new environment.
- Linux (to install with GPU support, change
requirements/pmaienv-linux.yml
torequirements/pmaienv-linux-gpu.yml
):
conda env create -f requirements/pmaienv-linux.yml source activate pmaienv-project
- Mac (to install with GPU support, change
requirements/pmaienv-mac.yml
torequirements/pmaienv-mac-gpu.yml
):
conda env create -f requirements/pmaienv-mac.yml source activate pmaienv-project
- Windows (to install with GPU support, change
requirements/pmaienv-windows.yml
torequirements/pmaienv-windows-gpu.yml
):
conda env create -f requirements/pmaienv-windows.yml activate pmaienv-project
- Linux (to install with GPU support, change
-
(Optional) If you are running the project on your local machine (and not using AWS) and Step 6 throws errors, try this alternative step to create your environment.
- Linux or Mac (to install with GPU support, change
requirements/requirements.txt
torequirements/requirements-gpu.txt
):
conda create --name pmaienv-project python=3.5 source activate pmaienv-project pip install -r requirements/requirements.txt
- Windows (to install with GPU support, change
requirements/requirements.txt
torequirements/requirements-gpu.txt
):
conda create --name pmaienv-project python=3.5 activate pmaienv-project pip install -r requirements/requirements.txt
- Linux or Mac (to install with GPU support, change
-
(Optional) If you are using AWS, install Tensorflow.
sudo python3 -m pip install -r requirements/requirements-gpu.txt
-
Switch Keras backend to TensorFlow.
- Linux or Mac:
KERAS_BACKEND=tensorflow python -c "from keras import backend"
- Windows:
set KERAS_BACKEND=tensorflow python -c "from keras import backend"
- Linux or Mac:
-
(Optional) If you are running the project on your local machine (and not using AWS), create an IPython kernel for the
pmaienv-project
environment.
python -m ipykernel install --user --name pmaienv-project --display-name "pmaienv-project"
- Launch Jupyter notebook.
jupyter notebook mnist_mlp.ipynb
- (Optional) If you are running the project on your local machine (and not using AWS), before running code, change the kernel to match the pmaienv-project environment by using the drop-down menu (Kernel > Change kernel > pmaienv-project).