+ All Categories
Home > Documents > Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow...

Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow...

Date post: 21-May-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
36
Roman Weber (Geschäftsführer) Richard Schmid (Senior Consultant) Experiments with Tensor Flow 23.05.2017
Transcript
Page 1: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

Roman Weber (Geschäftsführer)

Richard Schmid (Senior Consultant)

Experiments with Tensor Flow 23.05.2017

Page 2: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

Inhaber geführt

29

Mitarbeiter CH

2001

Gegründet

Beratung Umsetzung

Betrieb Support

IT Anbieter Partner

WEBGATE CONSULTING WEBGATE CONSULTING

Ex

Page 3: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

WebGate North America Boston, MA, USA

WebGate HQ Dietikon, Schweiz

WebGate Support Center Brno, Czech Republic

inxire GmbH Frankfurt, Deutschland

Batix Software GmbH Saalfeld, Deutschland

Page 4: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

4

A Smart Home?

Page 5: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

WEBGATE WELTWEIT

WebGate USA Boston

WebGate HQ Dietikon

WebGate Support Center Brno, Tschechische Republik

Page 6: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

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.

Page 7: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

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

Page 8: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

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

Page 9: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

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

Page 10: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

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

Page 11: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

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.

Page 12: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

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:

Page 13: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

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!

Page 14: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

14

AutoDraw

Page 15: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

15

Object Detection

Page 16: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

16

Cucumber Sorting

• Train with pictures to sort cucumbers according to certain criteria..

Page 17: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

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

Page 18: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

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.

Page 19: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

19

Atari Breakout after 100 training episodes

LEVEL: your grandma

Page 20: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

20

Atari Breakout after 200 training episodes

LEVEL: Novice

Page 21: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

21

Atari Breakout after 400 training episodes

LEVEL: Expert

Page 22: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

22

The AI has found the best strategy of tunnelling and hitting the ball behind the wall for maximum reward.

Atari Breakout after 600 training episodes

LEVEL: Skynet will hunt you down and destroy you!

Page 23: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

23

Virtual Pinball Computer starts learning and plays just like a child!

Page 24: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

24

Virtual Pinball

Page 25: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

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/watch?v=L1aKURvL26w

Page 26: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

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

Page 27: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

27

Hours later…

Page 28: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

28

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:

Still far from being a “Artifical General Intelligence”, but impressive nonetheless after just a few hours of studying movie transcripts on your local GPU.

Page 29: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

29

Failure prediction

Hard to solve using rule-based approch Let’s go back to our 1st world problem..

Page 30: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

30

Title

Page 31: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

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

Page 32: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

32

• 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

Failure Predition

Page 33: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

33

Gathering «tons» of data

Page 34: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

34

Interacting with your Smart Home The house issues audio warning to the inhabitants using text to speech technology

Page 35: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

35

& ANSWERS QUESTIONS

Page 36: Experiments with Tensor Flow 23.05 - Mission - …...2017/03/02  · Experiments with Tensor Flow 23.05.2017 Inhaber geführt 29 Mitarbeiter CH 2001 Gegründet Beratung Umsetzung Betrieb

36

WebGate Consulting AG

Riedstrasse 3 8953 Dietikon

Switzerland

Address +41 44 727 9393 Phone

myWebGate

CONTACT US

[email protected] Email

@RomanWebGate

@ www.webgate.biz


Recommended