Nueral Network Workshop – Lab 1

 

Use the VM

The easiest way to get going is to install a VM I’ve prepared that is preinstalled.

  1. Download the VM from my mega.nz share (one drive mirror)
  2. Use Hyper V Manager in Windows to Import the image contained in the zip.
  3. Login as username “student” password “password”
  4. Use a Terminal and type the command ifconfig to see what the VM’s IP Address is.
  5. Use Windows Remote desktop to connect to this VM.
  6. Skip down to the Test Install Section

 

Or Install it on Windows 10 or Linux Ubuntu 16.04

NOTE: Other versions of these OS’s may work, I have not tested any beyond these two.

PRE LAB (Windows) - CNTK Installer

  1. Install Windows 64 bit CNTK download

[collapse]
PRE LAB (Linux) - CNTK Installer

  1. Install Linux 64 bit CNTK download

[collapse]
Install GraphViz (Windows)

  1. Install https://graphviz.gitlab.io/_pages/Download/Download_windows.html
  2. Download the MSI Version for an easy install
  3. Add the install folder of graphviz to your system path, by default this is C:\Program Files (x86)\Graphviz2.38\bin (Video Tutorial)

[collapse]
Install GraphViz (Linux)

  1. sudo apt-get install graphviz

[collapse]
Install Packages

  1. Open Anaconda Prompt
  1. activate cntk-py35 (Windows)  |||  source activate-cntk (linux)
  2. conda install spyder
  3. conda install flask=0.12.2
  4. pip install pydot
  5. pip install graphviz
  6. leave the Anaconda Prompt open

[collapse]
Configure Keras to use CNTK

  1. At the prompt type the command python -i -c “import keras” (This results in the error “ImportError: No module named ‘tensorflow'” because by default it does not use CNTK)
  2. Modify the “keras.json” file under %USERPROFILE%/.keras (Windows)  ||| ~\.keras (linux)
  3. Set the “backend” field to “cntk”.
  4. If you do not have a keras.json, that means you have not run Keras on this machine, Go back to step 1

[collapse]

 

 

Test Install

Test Install

  1. Open Anaconda Prompt
  2. activate cntk-py35 (on linux / the vm use source cntk-py35)
  3. Run spyder
  4. Open cntk\Tutorials\NumpyInterop\FeedForwardNet.py 

A successful run will use CNTK to do a quick training and will look similar to below

[collapse]

 

Lab Complete!

 

Extra Credit – Useful info to read while you wait

Spyder IDE documentation
Beginner Tips for Python