pablomateo / MachineLearningMNIST

AI - Machine Learning Project sin MNIST Database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MachineLearningMNIST

Udacity - Artificial Intelligence Nanodegree Program

AI - Machine Learning Project sin MNIST Database

MLP on MNIST

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).


Instructions - Udacity Project

  1. Clone the repository and navigate to the downloaded folder.
git clone https://github.com/pablomateo/MachineLearningMNIST.git
cd MachineLearningMNIST
  1. (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.

  2. (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 to requirements/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 to requirements/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 to requirements/pmaienv-windows-gpu.yml):
    conda env create -f requirements/pmaienv-windows.yml
    activate pmaienv-project
    
  3. (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 to requirements/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 to requirements/requirements-gpu.txt):
    conda create --name pmaienv-project python=3.5
    activate pmaienv-project
    pip install -r requirements/requirements.txt
    
  4. (Optional) If you are using AWS, install Tensorflow.

sudo python3 -m pip install -r requirements/requirements-gpu.txt
  1. 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"
      
  2. (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"
  1. Launch Jupyter notebook.
jupyter notebook mnist_mlp.ipynb
  1. (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).

About

AI - Machine Learning Project sin MNIST Database

License:MIT License


Languages

Language:Jupyter Notebook 100.0%