<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Workshop – Introduction to Neural Networks using TensorFlow and Keras
http
Step1:  How does Tensorflow Low Level API look like?
Step2:  Interactive usage of Low Level API
Step3:  Calling a TensorFlow Model deployed on Google Cloud ML Service
Step4:  What can Keras do for us?
Abstracting from defining operations on tensors
Just define the network architecture and you are done
Keras compile the description of the model down to TensorFlow operations
Many other backends are supported
https
<ASSISTANT_TASK:>
Python Code:
import warnings
warnings.filterwarnings('ignore')
%matplotlib inline
%pylab inline
from distutils.version import StrictVersion
import sklearn
print(sklearn.__version__)
assert StrictVersion(sklearn.__version__ ) >= StrictVersion('0.18.1')
import tensorflow as tf
tf.logging.set_verbosity(tf.logging.ERROR)
print(tf.__version__)
assert StrictVersion(tf.__version__) >= StrictVersion('1.1.0')
import keras
print(keras.__version__)
assert StrictVersion(keras.__version__) >= StrictVersion('2.0.0')
import pandas as pd
print(pd.__version__)
assert StrictVersion(pd.__version__) >= StrictVersion('0.20.0')
Explanation: Workshop – Introduction to Neural Networks using TensorFlow and Keras
http://www.mcubed.london/sessions/workshop-introduction-to-neural-networks-using-tensorflow-and-keras/
<h1 style="color:red">Executing these notebooks on Azure is fine, however, for improved performance and reliability it is best to run it on a local machine or, ideally, on more powerful GPU hardware</h1>
<h2 style="color:red">You can download a complete library from Azure Notebooks as a zip</h2>
(local) installation goes like this:
Install Anaconda 3 for Python 3.6: https://www.anaconda.com/download/
Install TensorFlow for Anaconda: https://www.tensorflow.org/install/install_linux#InstallingAnaconda
e.g. like pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.3.0-cp36-cp36m-linux_x86_64.whl
Install Keras using pip: pip install keras --upgrade     
<h2 style="color:red">If all checks below pass and you can download the training material you are good to go, no matter what platform you are on</h2>
Notebook Basics
This is a Jupyter Notebook
You type commands which will be executed on a server (possibly remote)
A notebook saves all output of the commands executed, thus you can view it including results without executing it
Before using a notebook to type or edit commands make sure you execute all code
Do this by selecting Kernel, Restart & Run All in the menu
Tips
This is your personal notebook, add Python comments or markdown to take notes
Executing Cells
Everthing can be down using the Menu and Toolbar
Using the keyboard you can be faster, click on the Keyboard Symbol in the toolbar to learn about more short cuts
The most important shortcut is Shit+Enter which executes a cell and navigates to the next one
Preparations
Import and check required dependencies
End of explanation
# graph definition
matrix1 = tf.constant([[3., 3.]])
matrix2 = tf.constant([[2.],[2.]])
product = tf.matmul(matrix1, matrix2)
# launching the graph in a session
with tf.Session() as sess:
    result = sess.run([product])
    print(result)
Explanation: How does Tensorflow Low Level API look like?
End of explanation
sess = tf.InteractiveSession()
x = tf.Variable([1.0, 2.0])
a = tf.constant([3.0, 3.0])
# Initialize 'x' using the run() method of its initializer op.
x.initializer.run()
# Add an op to subtract 'a' from 'x'.  Run it and print the result
sub = tf.subtract(x, a)
print(sub.eval())
# ==> [-2. -1.]
# Close the Session when we're done.
sess.close()
Explanation: Interactive usage of Low Level API
End of explanation
!cat sample_iris.json
# Example for iris, model exported as Tensorflow
# gsutil cp -R 1 gs://irisnn
# create model and version at https://console.cloud.google.com/mlengine
# in a DOS shell on local machine in this folder
# gcloud ml-engine predict --model=irisnn --json-instances=./sample_iris.json
# SCORES
# [0.9954029321670532, 0.004596732556819916, 3.3544753819114703e-07]
Explanation: Calling a TensorFlow Model deployed on Google Cloud ML Service
End of explanation
!curl -O https://raw.githubusercontent.com/DJCordhose/speed-limit-signs/master/data/speed-limit-signs.zip
from zipfile import ZipFile
zip = ZipFile(r'speed-limit-signs.zip')
zip.extractall('.')
# Calling a Keras based model to classify speed limit signs
!curl -H "Content-Type: application/json" -X GET -d '{"url": "https://github.com/DJCordhose/speed-limit-signs/raw/master/data/real-world/4/100-sky-cutoff-detail.jpg", "model": "default" }' http://ec2-52-43-39-37.us-west-2.compute.amazonaws.com:8888
Explanation: What can Keras do for us?
Abstracting from defining operations on tensors
Just define the network architecture and you are done
Keras compile the description of the model down to TensorFlow operations
Many other backends are supported
https://github.com/fchollet/keras#getting-started-30-seconds-to-keras
Our task for today
Train a system to classify speed limit signs:
* We have a pretty realistic example
  * https://twitter.com/art_sobolev/status/907857395757481985?s=03: I don't think it's fine to only list experiments on toy datasets, and hide failures on more complicated cases.
* we need to find ways to keep our models simple to let them train in a few minutes
Getting the data
End of explanation
<END_TASK>