0% found this document useful (0 votes)
5 views46 pages

Deep Learning Introduction Class (1)

The document provides an overview of intelligence, artificial intelligence (AI), machine learning (ML), and deep learning (DL), highlighting their definitions and differences. It discusses various learning methods, including reinforcement learning, supervised and unsupervised learning, and the role of data in training models. Additionally, it covers deep learning frameworks, applications, and the advancements that have made DL more effective in recent years.

Uploaded by

aniket.s3a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views46 pages

Deep Learning Introduction Class (1)

The document provides an overview of intelligence, artificial intelligence (AI), machine learning (ML), and deep learning (DL), highlighting their definitions and differences. It discusses various learning methods, including reinforcement learning, supervised and unsupervised learning, and the role of data in training models. Additionally, it covers deep learning frameworks, applications, and the advancements that have made DL more effective in recent years.

Uploaded by

aniket.s3a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 46

Introduction

Intelligence vs Artificial Intelligence

 Intelligence is a property/ability attributed to people, such as to know, to think, to


talk, to learn, to understand.

Intelligence = Knowledge + ability to perceive, feel, comprehend, process, communicate, judge,


learn.

 Artificial Intelligence is an interdisciplinary field aiming at developing techniques


and tools for solving problems that people at good at.
Definition of AI

Existing definitions advocate everything from replicating human intelligence to


simply solving knowledge-intensive tasks.
Examples:
“Artificial Intelligence is the design, study and construction of computer
programs that behave intelligently.” -- Tom Dean.
AI is defined as an experimental discipline utilizing the ideas and the methods of
computation.
AI
Definitions of Machine Learning

Machine learning is a branch of artificial


intelligence based on the idea that systems can
learn from data, identify patterns and make
decisions with minimal human intervention.

A computer program that can learn from


experience E with respect to some class of
tasks T and performance measure P, so that its
performance at tasks in T, as measured by P,
improves with experience E.
What is Deep Learning
 Deep learning a brief history
 Artificial intelligence:
 Emerged in the 1950s; focused on the question of how to make computers think
 Goal is to automate intellectual tasks commonly done by humans
 It used to be believed that AI could be achieved using a set of detailed enough rules
 This is called symbolic AI.
Few Insights about AI,ML and DL
What is Reinforcement Learning?
 People and animals learn by interacting with our environment
 This differs from certain other types of learning
 It is active rather than passive
 Interactions are often sequential — future interactions can depend on earlier ones
 We are goal-directed
 We can learn without examples of optimal behavior
 Instead, we optimise some reward signal
The interaction loop

Goal: optimise sum of rewards, through repeated interaction


The reward hypothesis

Reinforcement learning is based on the reward hypothesis:


Any goal can be formalized as the outcome of maximizing a cumulative reward
Examples of RL problems
Fly a helicopter Reward: air time,
inverse distance, ...

Manage an investment portfolio Reward: gains, gains


minus risk, ...

Control a power station Reward: efficiency, ...

Make a robot walk Reward: distance,


speed, ...

Play video or board games Reward: win,


maximise score, ...
Data
 Humans learn by observation and
unsupervised learning
 model of the world /
common sense reasoning
 Machine learning needs lots of
(labeled) data to compensate
Data
 Tensors: generalization of matrices
to n dimensions (or rank, order, degree)
 1D tensor: vector
 2D tensor: matrix
 3D, 4D, 5D tensors
 numpy.ndarray(shape, dtype)
 Training – validation – test split
 Minibatches
 small sets of input data used at a time
 usually processed independently Image from:
https://arxiv.org/abs/1707.08945
Deep Learning and Machine Learning
 Machine learning tries to learn useful ways to “represent” the input data
so that it could be “transformed” to output that we want.
 A toy example of ‘representing the data’.

 Deep learning seeks to learn multiple layers of representation


 “deep” means many layers.
Model – learning/training – inference

http://playground.tensorflow.org/

 parameters 𝜃 and hyperparameters


Process in ML/DL
1. Regression
Regression algorithms are used if there is a relationship between the input variable and the output
variable. It is used for the prediction of continuous variables, such as Weather forecasting, Market
Trends, etc. Below are some popular Regression algorithms which come under supervised learning:
•Linear Regression
•Regression Trees
•Non-Linear Regression
•Bayesian Linear Regression
•Polynomial Regression
2. Classification
Classification algorithms are used when the output variable is categorical, which means there are
two classes such as Yes-No, Male-Female, True-false, etc.
•Spam Filtering,
•Random Forest
•Decision Trees
•Logistic Regression
•Support vector Machines
Unsupervised learning
Clustering: Clustering is a method of grouping the objects into clusters such that objects
with most similarities remains into a group and has less or no similarities with the objects
of another group. Cluster analysis finds the commonalities between the data objects and
categorizes them as per the presence and absence of those commonalities.
Deep Learning Paradigm

• The data transformation is stored in


the weights
• How well the transformation works is
measured by the loss function
• Weights can be updated to make the
transformation better
Deep learning
ML VS
DL
Layers
• Data processing modules
• Many different kinds exist
• densely connected
• convolutional
• recurrent
• pooling, flattening, merging, normalization, etc.
• Input: one or more tensors
output: one or more tensors
• Usually have a state, encoded as weights
• learned, initially random
• When combined, form a network or
a model
Input data and targets

• The network maps the input data X


to predictions Y′
• During training, the predictions Y′
are compared to true targets Y using
the loss function

cat
dog
Loss function
• The quantity to be minimized (optimized) during training
• the only thing the network cares about
• there might also be other metrics you care about
• Common tasks have “standard” loss functions:
• mean squared error for regression
• binary cross-entropy for two-class classification
• categorical cross-entropy for multi-class classification
• etc.
• https://lossfunctions.tumblr.com/
Optimizer
• How to update the weights
based on the loss function
• Learning rate (+scheduling)
• Stochastic gradient descent,
momentum, and their variants
• RMSProp is usually a good
first choice
• more info:
http://ruder.io/optimizing-gradient-descent/

Animation from: https://imgur.com/s25RsOr


Deep learning frameworks
Deep learning frameworks
+
• Actually tools for defining static or
dynamic general-purpose computational +

graphs
• Automatic differentiation ✕ ✕

• Seamless CPU / GPU usage


• multi-GPU, distributed x y 5

• Python/numpy or R interfaces
• instead of C, C++, CUDA or HIP
• Open source
Deep learning Lasagn
e
Keras
TF
Estimator
torch.nn Gluon

frameworks Thean TensorFlo CNTK PyTorch MXNet Caffe


o w
• Keras is a high-level
CUDA, cuDNN
MKL, MKL-DNN
neural networks API HIP, MIOpen

• we will use TensorFlow


as the compute backend GPUs CPUs
• included in TensorFlow 2 as tf.keras
• https://keras.io/ , https://www.tensorflow.org/guide/keras
• PyTorch is:
• a GPU-based tensor library
• an efficient library for dynamic neural networks
• https://pytorch.org/
Deep Learning’s Achievement So Far
There are many deep learning applications that are in our daily life now:
Things that DL do almost equally well as humans
 Computer vision
 Face recognition
 Speech recognition/dictation
 Translation
 Autonomous driving
Things that DL do better than human
• Playing GO
• Pattern recognition
• Medical image processing
Applications – Deep
Learning
Where we can apply

DL??
https://laughin
gsquid.com/ai
- lyric-
generator-that-
writes-songs/
Why Deep Learning Works Now
 Most of the algorithms exist since 1970s, and some in late 1990s.
 Many of the algorithm remain unchanged ever since
 E.g. LSTM
 Three major advances make DL a cutting edge development
 Hardware
 GPU
CPU vs. GPU
Why Deep Learning Works Better
Now
 Large collection of labelled data
 ImageNet
 Kaggle data mining challenge

 Algorithms
• Activation function (ReLU)
• Algorithms that help convergence
• Adam
• RMSProp
Extraction of features in
layers of CNN
 Lower layers of a multilayered convolutional neural network will learn
basic features such as corners and edges.
 The higher layers of the neural network will learn to detect more
complex features such as faces, objects, full scenes, etc.
 Ideally, a neural network’s latent space would represent concepts that
are relevant to the classes of images it is meant to detect.
Further resources
• Recommended textbook: “Deep learning”
by Goodfellow, Bengio, Courville
•“Deep Learning with Python” by François
Chollet

You might also like