DEEP LEARNING IN PYTHON. Introduction to deep learning

Similar documents
DEEP LEARNING IN PYTHON. Creating a keras model

Deep Learning with R. Francesca Lazzeri Data Scientist II - Microsoft, AI Research

DEEP LEARNING IN PYTHON. The need for optimization

Keras: Handwritten Digit Recognition using MNIST Dataset

An Introduction to NNs using Keras

Deep Nets with. Keras

Practical Deep Learning

Lecture 20: Neural Networks for NLP. Zubin Pahuja

ECE 5470 Classification, Machine Learning, and Neural Network Review

Deep Learning. Practical introduction with Keras JORDI TORRES 27/05/2018. Chapter 3 JORDI TORRES

Keras: Handwritten Digit Recognition using MNIST Dataset

Natural Language Processing with Deep Learning CS224N/Ling284. Christopher Manning Lecture 4: Backpropagation and computation graphs

Machine Learning With Python. Bin Chen Nov. 7, 2017 Research Computing Center

Natural Language Processing CS 6320 Lecture 6 Neural Language Models. Instructor: Sanda Harabagiu

Software and Practical Methodology. Tambet Matiisen Neural Networks course

Tensorflow Example: Fizzbuzz. Sargur N. Srihari

An Introduction to Deep Learning with RapidMiner. Philipp Schlunder - RapidMiner Research

Application of Deep Learning Techniques in Satellite Telemetry Analysis.

DEEP LEARNING REVIEW. Yann LeCun, Yoshua Bengio & Geoffrey Hinton Nature Presented by Divya Chitimalla

Deep Learning in NLP. Horacio Rodríguez. AHLT Deep Learning 2 1

Neural Networks (pp )

A Quick Guide on Training a neural network using Keras.

Machine Learning 13. week

Machine Learning: Chenhao Tan University of Colorado Boulder LECTURE 15

Index. Umberto Michelucci 2018 U. Michelucci, Applied Deep Learning,

CSC 578 Neural Networks and Deep Learning

Neural networks. About. Linear function approximation. Spyros Samothrakis Research Fellow, IADS University of Essex.

International Journal of Computer Engineering and Applications, Volume XII, Special Issue, September 18,

Code Mania Artificial Intelligence: a. Module - 1: Introduction to Artificial intelligence and Python:

SEMANTIC COMPUTING. Lecture 8: Introduction to Deep Learning. TU Dresden, 7 December Dagmar Gromann International Center For Computational Logic

COMP9444 Neural Networks and Deep Learning 5. Geometry of Hidden Units

Practical 8: Neural networks

Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling

Convolutional Neural Network Layer Reordering for Acceleration

How to Develop Encoder-Decoder LSTMs

NVIDIA FOR DEEP LEARNING. Bill Veenhuis

Event: PASS SQL Saturday - DC 2018 Presenter: Jon Tupitza, CTO Architect

Deep Learning with Tensorflow AlexNet

Tutorial on Machine Learning Tools

Tutorial on Deep Learning with Theano and Lasagne. Jan Schlüter Sander Dieleman EMBL-EBI

Multinomial Regression and the Softmax Activation Function. Gary Cottrell!

Deep Learning Applications

Deep Neural Networks Optimization

Technical University of Munich. Exercise 7: Neural Network Basics

Deep Learning. Vladimir Golkov Technical University of Munich Computer Vision Group

Matchbox. automatic batching for imperative deep learning NVIDIA GTC, 2018/3/28. James Bradbury

Lecture 7: Neural network acoustic models in speech recognition

ˆ How to develop a naive LSTM network for a sequence prediction problem.

Machine Learning. Deep Learning. Eric Xing (and Pengtao Xie) , Fall Lecture 8, October 6, Eric CMU,

Object Detection Lecture Introduction to deep learning (CNN) Idar Dyrdal

CS 6501: Deep Learning for Computer Graphics. Training Neural Networks II. Connelly Barnes

ˆ The first architecture to try with specific advice on how to configure hyperparameters.

Dropout. Sargur N. Srihari This is part of lecture slides on Deep Learning:

Knowledge Discovery and Data Mining. Neural Nets. A simple NN as a Mathematical Formula. Notes. Lecture 13 - Neural Nets. Tom Kelsey.

Deep Convolutional Neural Networks. Nov. 20th, 2015 Bruce Draper

Knowledge Discovery and Data Mining

Practical Tips for using Backpropagation

Symbolic Regression or:

Residual Networks And Attention Models. cs273b Recitation 11/11/2016. Anna Shcherbina

Sentiment Classification of Food Reviews

The Mathematics Behind Neural Networks

Partitioning Data. IRDS: Evaluation, Debugging, and Diagnostics. Cross-Validation. Cross-Validation for parameter tuning

Data Mining: Concepts and Techniques. Chapter 9 Classification: Support Vector Machines. Support Vector Machines (SVMs)

Hidden Units. Sargur N. Srihari

Homework 5. Due: April 20, 2018 at 7:00PM

Optimization. 1. Optimization. by Prof. Seungchul Lee Industrial AI Lab POSTECH. Table of Contents

Encoding RNNs, 48 End of sentence (EOS) token, 207 Exploding gradient, 131 Exponential function, 42 Exponential Linear Unit (ELU), 44

Planar data classification with one hidden layer

Convolutional-Recursive Deep Learning for 3D Object Classification

Outline. Deep Convolutional Neural Network (DCNN) Stochastic Computing (SC)

Deep Learning for Visual Computing Prof. Debdoot Sheet Department of Electrical Engineering Indian Institute of Technology, Kharagpur

Facial Keypoint Detection

Motivation. Problem: With our linear methods, we can train the weights but not the basis functions: Activator Trainable weight. Fixed basis function

Inception and Residual Networks. Hantao Zhang. Deep Learning with Python.

Hello Edge: Keyword Spotting on Microcontrollers

Python Tutorial. CS/CME/BioE/Biophys/BMI 279 Oct. 17, 2017 Rishi Bedi

Automation.

CS230: Deep Learning Winter Quarter 2018 Stanford University

Machine Learning and Algorithms for Data Mining Practical 2: Neural Networks

MULTIPLE OPERAND ADDITION. Multioperand Addition

Machine Learning. MGS Lecture 3: Deep Learning

Predictive Analytics: Demystifying Current and Emerging Methodologies. Tom Kolde, FCAS, MAAA Linda Brobeck, FCAS, MAAA

Deep Learning. Deep Learning provided breakthrough results in speech recognition and image classification. Why?

Convolutional Neural Network for Image Classification

5th Vienna Deep Learning Meetup

Back propagation Algorithm:

Ensemble methods in machine learning. Example. Neural networks. Neural networks

Recurrent Neural Networks

Deep Learning for Computer Vision

Owl - A General-Purpose Numerical Library in OCaml

CIS581: Computer Vision and Computational Photography Project 4, Part B: Convolutional Neural Networks (CNNs) Due: Dec.11, 2017 at 11:59 pm

ECE 6504: Deep Learning for Perception

Artificial Intelligence Introduction Handwriting Recognition Kadir Eren Unal ( ), Jakob Heyder ( )

Neural Network Optimization and Tuning / Spring 2018 / Recitation 3

Analyzing rtweet data with kerasformula

All You Want To Know About CNNs. Yukun Zhu

Neural Networks with Input Specified Thresholds

SEMANTIC COMPUTING. Lecture 9: Deep Learning: Recurrent Neural Networks (RNNs) TU Dresden, 21 December 2018

Frameworks in Python for Numeric Computation / ML

Global Optimality in Neural Network Training

Transcription:

DEEP LEARNING IN PYTHON Introduction to deep learning

Imagine you work for a bank You need to predict how many transactions each customer will make next year

Example as seen by linear regression Age Bank Balance Number of Transactions Retirement Status

Example as seen by linear regression Model with no interactions Model with interactions Predicted Transactions Not Retired Predicted Transactions Not Retired Retired Retired Bank Balance Bank Balance

Interactions Neural networks account for interactions really well Deep learning uses especially powerful neural networks Text Images Videos Audio Source code

Course structure First two chapters focus on conceptual knowledge Debug and tune deep learning models on conventional prediction problems Lay the foundation for progressing towards modern applications This will pay off in the third and fourth chapters

Build deep learning models with keras In []: import numpy as np In []: from keras.layers import Dense In [3]: from keras.models import Sequential In [4]: predictors = np.loadtxt('predictors_data.csv', delimiter=',') In [5]: n_cols = predictors.shape[] In [6]: model = Sequential() In [7]: model.add(dense(00, activation='relu', input_shape = (n_cols,))) In [8]: model.add(dense(00, activation='relu') In [9]: model.add(dense())

Deep learning models capture interactions Age Bank Balance Number of Transactions Retirement Status

Interactions in neural network Input Layer Hidden Layer Age Output Layer Income # Accounts Number of Transactions

DEEP LEARNING IN PYTHON Let s practice!

DEEP LEARNING IN PYTHON Forward propagation

Course Title Bank transactions example Make predictions based on: Number of children Number of existing accounts

Forward propagation Input Hidden Layer # Children 5 Output - 9 # Transactions - # Accounts 3

Forward propagation Input Hidden Layer # Children 5 Output - 9 # Transactions - # Accounts 3

Forward propagation Input Hidden Layer # Children 5 Output - 9 # Transactions - # Accounts 3

Forward propagation Input Hidden Layer # Children 5 Output - 9 # Transactions - # Accounts 3

Course Title Forward propagation Multiply - add process Dot product Forward propagation for one data point at a time Output is the prediction for that data point

Forward propagation code In []: import numpy as np In []: input_data = np.array([, 3]) In [3]: weights = {'node_0': np.array([, ]),...: 'node_': np.array([-, ]),...: 'output': np.array([, -])} In [4]: node_0_value = (input_data * weights['node_0']).sum() In [5]: node value = (input_data * weights['node_']).sum() Input Hidden Layer Output 5 3 - -

Forward propagation code In [6]: hidden_layer_values = np.array([node_0_value, node value]) In [7]: print(hidden_layer_values) [5, ] In [8]: output = (hidden_layer_values * weights['output']).sum() In [9]: print(output) 9 Input Hidden Layer Output 5 9 3 - -

DEEP LEARNING IN PYTHON Let s practice!

DEEP LEARNING IN PYTHON Activation functions

Linear vs Nonlinear Functions Linear Functions Nonlinear Functions

Activation functions Applied to node inputs to produce node output

Improving our neural network Input Hidden Layer 5 Output - - 9 3

Activation functions Input Hidden Layer tanh(+3) Output - - 9 3 tanh(-+3)

ReLU (Rectified Linear Activation) Rectifier

Activation functions In []: import numpy as np In []: input_data = np.array([-, ]) In [3]: weights = {'node_0': np.array([3, 3]),...: 'node_': np.array([, 5]),...: 'output': np.array([, -])} In [4]: node_0_input = (input_data * weights['node_0']).sum() In [5]: node_0_output = np.tanh(node_0_input) In [6]: node input = (input_data * weights['node_']).sum() In [7]: node output = np.tanh(node input) In [8]: hidden_layer_outputs = np.array([node_0_output, node output]) In [9]: output = (hidden_layer_output * weights['output']).sum() In [0]: print(output).3845569454

DEEP LEARNING IN PYTHON Let s practice!

DEEP LEARNING IN PYTHON Deeper networks

Multiple hidden layers 3 - Age -3 4 4 7 5-5 Calculate with ReLU Activation Function

Multiple hidden layers 3 - Age -3 4 4 7 5-5 Calculate with ReLU Activation Function

Multiple hidden layers 3 - Age -3 4 4 7 5-5 Calculate with ReLU Activation Function

Multiple hidden layers 3 - Age -3 4 4 7 5-5 Calculate with ReLU Activation Function

Multiple hidden layers 3 - Age -3 4 4 7 5-5 Calculate with ReLU Activation Function

Multiple hidden layers 3 Age 4 5 Calculate with ReLU Activation Function

Multiple hidden layers 3 Age 4 5 Calculate with ReLU Activation Function

Multiple hidden layers 3 Age 4 5 Calculate with ReLU Activation Function

Multiple hidden layers 3 6 Age 4 5 Calculate with ReLU Activation Function

Multiple hidden layers 3 6 Age 4 5-5 Calculate with ReLU Activation Function

Multiple hidden layers 3 6 Age 4 5-5 Calculate with ReLU Activation Function

Multiple hidden layers 3 6 Age 4 5-5 Calculate with ReLU Activation Function

Multiple hidden layers 3 6 - Age -3 4 4 7 5-5 0 Calculate with ReLU Activation Function

Multiple hidden layers 3 4 6 - Age 0-3 4 7 364 5-5 0 5 Calculate with ReLU Activation Function

Representation learning Deep networks internally build representations of patterns in the data Partially replace the need for feature engineering Subsequent layers build increasingly sophisticated representations of raw data

Representation learning Deep Learning in Python

Deep learning Modeler doesn t need to specify the interactions When you train the model, the neural network gets weights that find the relevant patterns to make better predictions

DEEP LEARNING IN PYTHON Let s practice!