AI, here I come!

Output of me trying to run AI: :grinning: :white_check_mark:

code@machine:~$ sudo pip install Theano
WARNING: The directory '/home/code/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/home/code/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting Theano
  Downloading https://files.pythonhosted.org/packages/7d/c4/6341148ad458b6cd8361b774d7ee6895c38eab88f05331f22304c484ed5d/Theano-1.0.4.tar.gz (2.8MB)
     |████████████████████████████████| 2.8MB 3.3MB/s 
Requirement already satisfied: numpy>=1.9.1 in ./.local/lib/python3.6/site-packages (from Theano) (1.17.1)
Requirement already satisfied: scipy>=0.14 in ./.local/lib/python3.6/site-packages (from Theano) (1.3.1)
Requirement already satisfied: six>=1.9.0 in ./.local/lib/python3.6/site-packages (from Theano) (1.12.0)
Building wheels for collected packages: Theano
  Building wheel for Theano (setup.py) ... done
  Created wheel for Theano: filename=Theano-1.0.4-cp36-none-any.whl size=2667178 sha256=8a8cb854fd3ad6fabb6486a667c81381521d7c9a09a39303d7f437aee233c91a
  Stored in directory: /home/code/.cache/pip/wheels/88/fb/be/483910ff7e9f703f30a10605ad7605f3316493875c86637014
Successfully built Theano
Installing collected packages: Theano
Successfully installed Theano-1.0.4
code@machine:~$ cd .keras
code@machine:~/.keras$ nano keras.json 
code@machine:~/.keras$ cd ..
code@machine:~$ python
Python 2.7.15+ (default, Nov 27 2018, 23:36:35) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
code@machine:~$ python3
Python 3.6.8 (default, Jan 14 2019, 11:02:34) 
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> imort keras
  File "<stdin>", line 1
    imort keras
              ^
SyntaxError: invalid syntax
>>> import keras
Using Theano backend.
>>> 
code@machine:~$ cd MicroHat/
code@machine:~/MicroHat$ mkdir ai
code@machine:~/MicroHat$ cd ai/
code@machine:~/MicroHat/ai$ mkdir digits
code@machine:~/MicroHat/ai$ cd digits/
code@machine:~/MicroHat/ai/digits$ nano
^Ccode@machine:~/MicroHat/ai/digits$ nano handrwritten_digit.py 
code@machine:~/MicroHat/ai/digits$ python3 handrwritten_digit.py 
Using Theano backend.
Traceback (most recent call last):
  File "handrwritten_digit.py", line 33, in <module>
    train_X, train_y, val_X, val_y, test_X, test_y = load_data(mnist_path)
  File "handrwritten_digit.py", line 22, in load_data
    with gzip.open(mnist_path, 'rb') as f:
  File "/usr/lib/python3.6/gzip.py", line 53, in open
    binary_file = GzipFile(filename, gz_mode, compresslevel)
  File "/usr/lib/python3.6/gzip.py", line 163, in __init__
    fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'mnist.pkl.gz'
code@machine:~/MicroHat/ai/digits$ cp Downloads/mnist.pkl.gz 
cp: missing destination file operand after 'Downloads/mnist.pkl.gz'
Try 'cp --help' for more information.
code@machine:~/MicroHat/ai/digits$ cp Downloads/mnist.pkl.gz .
cp: cannot stat 'Downloads/mnist.pkl.gz': No such file or directory
code@machine:~/MicroHat/ai/digits$ cp /home/code/Downloads/mnist.pkl.gz .
code@machine:~/MicroHat/ai/digits$ ls
handrwritten_digit.py  mnist.pkl.gz
code@machine:~/MicroHat/ai/digits$ python3 handrwritten_digit.py 
Using Theano backend.
Model: "model_1"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
input_1 (InputLayer)         (None, 28, 28, 1)         0         
_________________________________________________________________
conv2d_1 (Conv2D)            (None, 26, 26, 32)        320       
_________________________________________________________________
re_lu_1 (ReLU)               (None, 26, 26, 32)        0         
_________________________________________________________________
flatten_1 (Flatten)          (None, 21632)             0         
_________________________________________________________________
dense_1 (Dense)              (None, 11)                237963    
_________________________________________________________________
softmax_1 (Softmax)          (None, 11)                0         
=================================================================
Total params: 238,283
Trainable params: 238,283
Non-trainable params: 0
_________________________________________________________________
None
WARNING (theano.tensor.blas): We did not find a dynamic library in the library_dir of the library we use for blas. If you use ATLAS, make sure to compile it with dynamics library.
Train on 60000 samples, validate on 12000 samples
Epoch 1/2
60000/60000 [==============================] - 247s 4ms/step - loss: 0.2185 - acc: 0.9373 - val_loss: 0.1393 - val_acc: 0.9619
Epoch 2/2
60000/60000 [==============================] - 243s 4ms/step - loss: 0.1406 - acc: 0.9598 - val_loss: 0.1257 - val_acc: 0.9668
----------------Training is Complete------------------
12000/12000 [==============================] - 13s 1ms/step
batch size: 40, learning rate: 0.100000, epochs: 2 

Test Accuracy: 96.68333333333334
============================= 0 ============================
Image:
My Prediction is: 5 with 62.68974542617798% Confidence
============================= 1 ============================
Image:
My Prediction is: 0 with 99.99253153800964% Confidence
============================= 2 ============================
Image:
My Prediction is: 4 with 98.47410321235657% Confidence
============================= 3 ============================
Image:
My Prediction is: 1 with 98.79490733146667% Confidence
============================= 4 ============================
Image:
My Prediction is: 9 with 95.29516696929932% Confidence
============================= 5 ============================
Image:
My Prediction is: 2 with 99.49957728385925% Confidence
============================= 6 ============================
Image:
My Prediction is: 1 with 99.87781643867493% Confidence
============================= 7 ============================
Image:
My Prediction is: 3 with 99.85511898994446% Confidence
============================= 8 ============================
Image:
My Prediction is: 1 with 99.55264329910278% Confidence
============================= 9 ============================
Image:
My Prediction is: 4 with 99.94164705276489% Confidence
============================= 10 ============================
Image:
My Prediction is: 3 with 99.59768056869507% Confidence
============================= 11 ============================
Image:
My Prediction is: 5 with 98.59977960586548% Confidence
============================= 12 ============================
Image:
My Prediction is: 3 with 99.99275803565979% Confidence
============================= 13 ============================
Image:
My Prediction is: 6 with 99.86432194709778% Confidence
============================= 14 ============================
Image:
My Prediction is: 1 with 99.29090738296509% Confidence
============================= 15 ============================
Image:
My Prediction is: 7 with 98.56083393096924% Confidence
============================= 16 ============================
Image:
My Prediction is: 2 with 98.63857626914978% Confidence
============================= 17 ============================
Image:
My Prediction is: 8 with 98.47996830940247% Confidence
============================= 18 ============================
Image:
My Prediction is: 6 with 94.06450986862183% Confidence
============================= 19 ============================
Image:
My Prediction is: 9 with 90.84867238998413% Confidence
code@machine:~/MicroHat/ai/digits$ 
``