TENSORFLOW: ARCHITECTURE AND USE CASE - NASA SPACE APPS CHALLENGE by Gema Parreño

42

Transcript of TENSORFLOW: ARCHITECTURE AND USE CASE - NASA SPACE APPS CHALLENGE by Gema Parreño

GEMA PARREÑO PIQUERAS@SoyGema

WHAT IS AN ARTIFICIAL NEURON?

WHAT IS AN ARTIFICIAL NEURON ?

Image RecognitionClassification using Softmax Regressions and Convolutional Neural Networks

Languaje UnderstandingFind in SoftMax Regression interesting semantic Relationships

What is Tensor Flow ?

Open Source Pythonartificial intelligencelibrary using data flowgraphs to build models

Helps to createa deep neural

networkarchitecture

Used in languageunderstanding,image

recognition, classification and

prediction .

Advantajes about

1.Flexibility of representation. Create anytype of data flow graph

2.Performs calculations bothon CPU and GPU . Supports forparallel and asynchronous

computations

1.Higly Scalable acrossmany machines and huge

datasets

3. Comes with many toolshelping to build and

visualize the data flownetworks and neural nets

What is Tensor Flow used for ?

PERCEPTION

License ApacheFor both Research and Commercial Propouses

DISCOVERINGUNDERSTANDING

PREDICTION

CREATION

CLASSIFICATION

Difference in between Machine Learning and Deep Learning

CORE : Deep LearningCan run on multiple CUPs and GPUsUSES : Perceptual and language

understandingNEURAL NETWORKS

MULTILAYERED - HMM

CORE : Machine LearningBased on more logical inputs USES : Perceptual and language

understandingREASONING

NAIVE BAYES

MULTILAYERED CONTEXTS

CORE :Deep learning generally means building large scale neural networks with many layers

LOGICAL REASONING

The Main architecture of TensorFlow

The Main architecture of TensorFlow

TENSORSStructure of data

GRAPHSGraphic representationof the computational

process

VARIABLES Helps define the

structure of the neural net model

NEURAL NETSStructure that is built todeal with complex problems

The Main architecture of TensorFlow

DATATensors :multidimensional and dynamically sized data arraysTF use a tensor data structure

to represent all data

Comparing to matrix it has more dregrees of freedom

regarding data selection and slicing.

tf.Tensor class

TENSOR

ARCHITECTURE TIPTensor is a structure in wich

you can add levels of complexity

From Scalar to time!

The Main architecture of TensorFlow TENSOR

RANK

SHAPES

TYPES

Definesstructure of the Tensor

How we write orrepresent it onTensor FlowDefines

dimensionality

Structure of the kind of data we are going to deal

with

The Main architecture of TensorFlow TENSORTENSOR TRANSFORMATIONS

SHAPINGOperations that you can use to

determine the shape of a tensor and change the shape of

a tensor tf.reshape(input, name=None)

Reshape a tensor

SLICING & JOINING

Operations to slice or extract partsof a tensor, or join multiple tensors

togetherTf.slice(input_, begin, size,

name=None)Extracts a slice of a tensor

The Main architecture of TensorFlow

TRAINWhen you train a model, you use variables to

hold and updateparameters .

Variables containstensors

Can be shaped and restored.It has an specific class

tf.Variable class

VARIABLES

ARCHITECTURE TIPDuring the training phase, you might

discover a variable useful value.

Weights and biases are variables

The Main architecture of TensorFlow

Process forinitializing

thevariables.

Save and restore a modelto the graphswith a variable

When yourestore

variables froma file you do not have to

initialize them

INITIALIZATION

SAVING

RESTORING

tf.initialize_all_variables()

tf.train.Saver()Saver.save ()

VARIABLES

Saver.restore()

The Main architecture of TensorFlow

KNOWLEDGE REPRESENTATION

Launch de graph starting a session.Asession object encapsulates th

enviroment in wich Operation objectsare exexuted, and Tensor objects are

evaluated

When you run a sessionit is considered a representation

tf.Graph class

GRAPHS

ARCHITECTURE TIPGraphs are visual construction of theNeural Network :

considered knowledgerepresentation

How to best construct a Graph in Tensor Flow ?

Example of of a data flow graph with multiple nodes (data operations). Notice how the execution of nodes is asynchronous. This allows incredible scalability across

many machines

Online Resources for TensorFlow

Tips & Tricks for Designing Neural Nets

TIPS & TRICKSFOR DESIGNING NEURAL

NETS

ARCHITECTURE TIPIn the Neural Net, howwe structure data willdefine the tensorflowmodel construction.

ARCHITECTURE TIPSeize the data . Theselection of training data has alredy proven

to be key in thelearning process

ARCHITECTURE TIPThink about thelearning as a multilayered

process by design

ARCHITECTURE TIPIn the Neural Net,

knowledge hierarchy iskey. Think about

learning from bottom-top of top-bottom aproach

BooksTheBRAIN

Tutorials

Social

Courses

https://medium.com/@gema.parreno.piqueras/

TENSOR FLOW PLAYGROUND

DESIGN THE LEARNING PROCESS in the netInput / output and activation function

TENSOR FLOW FOR POETS

CREATE YOUR OWN CLASSIFIER in the

netInput / output and activation function

Integrationin products

NO SILVERBULLETS

Withoutproduct

expertise…

Nasa Apps Challenge 2016

Neo´s neural Net design NEURAL NET

A

DATASETS

B

EXECUTION OF NEO RECOGNIZING PROTOCOL

Extract into a CSV the actionable data for training process. Select a balanced

dataset for training, including knownmatched NEO´s.

C D

1st LAYER

EVALUATIONExecution of theprotocol described in “Hazards Due to Cometsand Asteroids” Treedecision data pruningprocess that allows rawdata to transform into

knowledge

Feed the neural net withtraining data. Create a tensor and including a transfer function thatmatches the known orbit

of the NEO and do classification into the 4

main groups.

Execute a Softmaxregression with thespectral and physical

data about theasteroid, gathering

info about thepotencial harm the

NEO could do.

Neo´s neural Net design NEURAL NET

E

2nd LAYER

Retrain the Neural Network. Sometimes theobservation of NEO´smight drive into

changes. The software allow us to prune false

positives

If we re-train a neural net over time, are weteaching it to change ?

Top 25 project among allprojects worldwide

Variables can be trainedabout the uncertainty of

the change in orbitclassification, offeringan advantage against otherclassification approaches

Opportunity to have a highlevel of abstraction in design, and learn abouthow the observation of NEO´s can influence intotheir classification

One of the main keyconcepts about this is

about how time can changeclassification and how wetrain a neural net to

visualize it.

Thank you!

@SoyGema

[email protected]