Experiments with Tensor Flow 23.05.2017 Roman Weber (Geschäftsführer) Richard Schmid (Senior Consultant)
WEBGATE CONSULTING Gegründet Mitarbeiter CH Inhaber geführt IT Anbieter Partner 2001 Ex 29 Beratung Umsetzung Betrieb Support
WebGate North America Boston, MA, USA inxire GmbH Frankfurt, Deutschland Batix Software GmbH Saalfeld, Deutschland WebGate HQ Dietikon, Schweiz WebGate Support Center Brno, Czech Republic
A Smart Home? 4
WEBGATE WELTWEIT WebGate USA Boston WebGate Support Center Brno, Tschechische Republik WebGate HQ Dietikon
6 Playing GO? Go is an ancient board game for two players that originated in China more than 2,000 years ago, played on a grid of 19 19 lines. The object of the game is to use one's stones to control a larger amount of territory of the board than the opponent.
7 «Brute Force does not help!» Go has more possible positions than there are atoms in the universe. 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 times more complex than chess An intelligent machine is needed instead of brute force playing
8 AlphaGo wins 5-0 October 2015, AlphaGo wins 5-0 against the reigning 3- times European Champion, Fan Hui March 2016: AlphaGo beats Lee Sedol (top player in the world) 4 to 1
9 AlphaGo by Google DeepMind The Goal: Win Go against humans using a combination of tree search and deep neural networks Buzzword bingo list: Traditional MCTS (Monte Carlo Tree Search) Neural networks (one for policy, one for value) SL Supervised Learning RL Reinforcement Learning Full details search for: AlphaGoNaturePaper.pdf
10 What s behind Google s AlphaGo Torch7 TensorFlow Custom GPU s called TPU (Tensor Processing Units) ASIC chip for machine learning, specifically optimized for TensorFlow, more efficient than Nvidia GPUs. The final version of AlphaGo used 40 search threads, 48 CPUs, and 8 GPUs (~5 seconds per move) Google also implemented a distributed version of AlphaGo that exploited multiple machines, 40 search threads, 1,202 CPUs and 176 GPUs
11 What is TensorFlow? Can run on CPUs GPUs (NVIDIA) Or even distributed If you re not a 3D NVIDIA graphics gamer:..just launch the Machine Learning AMI in Amazon EC2 and assign tons of GPUs TensorFlow is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them. The flexible architecture allows you to deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device with a single API. TensorFlow was originally developed by researchers and engineers working on the Google Brain Team within Google's Machine Intelligence research organization for the purposes of conducting machine learning and deep neural networks research, but the system is general enough to be applicable in a wide variety of other domains as well.
12 TensorFlow examples MNIST: the hello world of machine learning Teach tensorflow to read hand written digits Consists of hand written digits like these: Each image is 28 pixels by 28 pixels. We can interpret this as a big array of numbers:
13 To train TensorFlow, feed training data (arrays of images) Tensor: multi-dimensional array with the shape of e.g. [55 000, 784] Provide 55 000 data points of training data (used to learn) 10 000 points test data (used to test while learning) 5 000 points validation data (used to validate final model) Never use the remaining 5 000 validation points while in learning mode! Use Amazon Mechanical Turk to mass-classify data by humans TensorFlow can now start learning patterns and will be able to recognize hand written digits with ~99.2% accuracy!
AutoDraw 14
Object Detection 15
16 Cucumber Sorting Train with pictures to sort cucumbers according to certain criteria..
17 Playing Video Games gym.openai.com also uses TensorFlow OpenAI is a non-profit AI research company, discovering and enacting the path to safe artificial general intelligence. Sponsors ->
18 Atari Breakout Example Game runs in a docker VM container TensorFlow connects to that VM via VNC remote desktop TensorFlow can send keystrokes (left / right) TensorFlow can see the game just by looking at the framebuffer pixels (tensor arrays of bits) No initial rules (no if this then that ), just parsing for rewards! The machine does not know it has to move the bar or shoot at something. The machine has to learn on its own by watching, trying, verifying, repeating over and over again.
Atari Breakout after 100 training episodes LEVEL: your grandma 19
Atari Breakout after 200 training episodes LEVEL: Novice 20
Atari Breakout after 400 training episodes LEVEL: Expert 21
22 Atari Breakout after 600 training episodes LEVEL: Skynet will hunt you down and destroy you! The AI has found the best strategy of tunnelling and hitting the ball behind the wall for maximum reward.
23 Virtual Pinball Computer starts learning and plays just like a child!
Virtual Pinball 24
25 Neural Conversational Chatbot with TensorFlow IBM Watson Conversation Service AWS Lex etc just statically scripted intent response dialogues Alexa meets Watson Example: https://www.youtube.com/watc h?v=l1akurvl26w
26 Neural Conversational Chatbot with TensorFlow Feed tensors with text instead of binary images. No sentence hard-wiring. Sources: Cornell Movie Dialogs OpenSubtitles - Movie subtitles database Supreme court conversation data Or your own conversation data
Hours later 27
Neural Conversational Chatbot with TensorFlow Results after only 1 or 2 hours of training on a GeForce GT 740M, by drastically reducing the input sequence to 5 words and output to 3. Result: Failed results: After additional training: 28 Still far from being a Artifical General Intelligence, but impressive nonetheless after just a few hours of studying movie transcripts on your local GPU.
29 Failure prediction Hard to solve using rule-based approch Let s go back to our 1 st world problem..
Title 30
31 Failure Predition To predict failures, watch as much sensor data as possible to find patterns An electric powered motor can have high peaks of current while starting up, but if the current raises above normal level during operation, something smells fishy. Pattern recognition of deep learning should be able to detect anomalies beyond fixed rule-based min/max thresholds by including the big picture.
32 Failure Predition Collect KNX sensor readings for several weeks (the more, the better) Forwarded from KNX Bus to MQTT Broker KNX (formerly Siemens Instabus) is a 2-wire data bus similar to CAN-Bus
Gathering «tons» of data 33
34 Interacting with your Smart Home The house issues audio warning to the inhabitants using text to speech technology
QUESTIONS & ANSWERS 35
36 CONTACT US WebGate Consulting AG Address Riedstrasse 3 8953 Dietikon Switzerland Phone +41 44 727 9393 Email roman.weber@webgate.biz @ www.webgate.biz mywebgate @RomanWebGate