Deep Learning Notes

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

UNIT 3

Recurrent neural network(RNN)

Recurrent neural network (RNN) is more like Artificial Neural Networks (ANN)
that are mostly employed in speech recognition and natural language processing
(NLP). Deep learning and the construction of models that mimic the activity of
neurons in the human brain uses RNN.
Text, genomes, handwriting, the spoken word, and numerical time series data from
sensors, stock markets, and government agencies are examples of data that recurrent
networks are meant to identify patterns in. A recurrent neural network resembles a
regular neural network with the addition of a memory state to the neurons. A simple
memory will be included in the computation.
Recurrent neural networks are a form of deep learning method that uses a sequential
approach. We always assume that each input and output in a neural network is
reliant on all other levels. Recurrent neural networks are so named because they
perform mathematical computations in consecutive order.
Types of RNN :
1. One-to-One RNN:

One-to-One RNN

The above diagram represents the structure of the Vanilla Neural Network. It is used
to solve general machine learning problems that have only one input and output.
Example: classification of images.
2. One-to-Many RNN:
One-to-Many RNN

A single input and several outputs describe a one-to-many Recurrent Neural


Network. The above diagram is an example of this.
Example: The image is sent into Image Captioning, which generates a sentence of
words.
3. Many-to-One RNN:

Many-to-One RNN

This RNN creates a single output from the given series of inputs.
Example: Sentiment analysis is one of the examples of this type of network, in which
a text is identified as expressing positive or negative feelings.
4. Many-to-Many RNN:

Many-to-Many RNN

This RNN receives a set of inputs and produces a set of outputs.

Long short-term memory (LSTM)

Long short-term memory (LSTM)[1] network is a recurrent neural network (RNN),


aimed to deal with the vanishing gradient problem[2] present in traditional RNNs. Its
relative insensitivity to gap length is its advantage over other RNNs, hidden Markov
models and other sequence learning methods. It aims to provide a short-term memory
for RNN that can last thousands of timesteps, thus "long short-term memory".[1] It is
applicable to classification, processing and predicting data based on time series, such
as in handwriting,[3] speech recognition,[4][5] machine translation,[6][7] speech
activity detection,[8] robot control,[9][10] video games,[11][12] and healthcare.[13]

fig. LSTM.

Encoder and Decoder

The encoder-decoder architecture for recurrent neural networks is the standard neural
machine translation method that rivals and in some cases outperforms classical
statistical machine translation methods.
This architecture is very new, having only been pioneered in 2014, although, has been
adopted as the core technology inside Google’s translate service.
Encoder-Decoder Model
There are three main blocks in the encoder-decoder model,
Encoder
Hidden Vector
Decoder
The Encoder will convert the input sequence into a single-dimensional vector (hidden
vector). The decoder will convert the hidden vector into the output sequence.
Encoder-Decoder models are jointly trained to maximize the conditional probabilities
of the target sequence given the input sequence.

UNIT 4

Autoencoder

An autoencoder is a type of artificial neural network used to learn efficient codings of


unlabeled data (unsupervised learning).[1][2] An autoencoder learns two functions: an
encoding function that transforms the input data, and a decoding function that
recreates the input data from the encoded representation. The autoencoder learns an
efficient representation (encoding) for a set of data, typically for
dimensionality reduction.
Fig :- Autoencoder

Types of Autoencoders

An autoencoder is a type of artificial neural network used to learn efficient data


codings in an unsupervised manner. The goal of an autoencoder is to:
 learn a representation for a set of data, usually for dimensionality reduction by
training the network to ignore signal noise.
Along with the reduction side, a reconstructing side is also learned, where the
autoencoder tries to generate from the reduced encoding a representation as close as
possible to its original input. This helps autoencoders to learn important features
present in the data.
When a representation allows a good reconstruction of its input then it has retained
much of the information present in the input. Recently, the autoencoder concept has
become more widely used for learning generative models of data.

There are, basically, 7 types of autoencoders:

 Denoising autoencoder
 Sparse Autoencoder
 Deep Autoencoder
 Contractive Autoencoder
 Undercomplete Autoencoder
 Convolutional Autoencoder
 Variational Autoencoder

UNIT 5

Representation Learning

Representation Learning is a process in machine learning where algorithms extract


meaningful patterns from raw data to create representations that are easier to
understand and process. These representations can be designed for interpretability,
reveal hidden features, or be used for transfer learning. They are valuable across many
fundamental machine learning tasks like image classification and retrieval.

Deep neural networks can be considered representation learning models that typically
encode information which is projected into a different subspace. These representations
are then usually passed on to a linear classifier to, for instance, train a classifier.

Greedy unsupervised pretraining

Greedy unsupervised pretraining is sometimes helpful but often harmful. It combines


two ideas: 1) the choice of initial parameters of a deep neural network can have a
significant regularizing effect; 2) learning about the input distribution can help with
learning about the mapping from inputs to outputs.
Representation, i.e. how the information is represented, can affect the difficulty of
processing tasks a lot. Generally speaking, a good representation is one that makes a
subsequent learning task easier. (TASK-CENTERED)

Types of Deep Transfer Learning


Domain Adaptation. Domain adaptation is a transfer learning scenario where the
source and target domains have different feature spaces and distributions. ...
Domain Confusion. ...
Multi-task Learning. ...
One-shot Learning. ...
Zero-shot Learning.

UNIT 6

Deep Learning Application

1. Virtual Assistants

Virtual Assistants are cloud-based applications that understand natural language voice
commands and complete tasks for the user. Amazon Alexa, Cortana, Siri, and Google
Assistant are typical examples of virtual assistants. They need internet-connected devices to
work with their full capabilities. Each time a command is fed to the assistant, they tend to
provide a better user experience based on past experiences using Deep Learning algorithms.
2. Chatbots

Chatbots can solve customer problems in seconds. A chatbot is an AI application to chat


online via text or text-to-speech. It is capable of communicating and performing actions
similar to a human. Chatbots are used a lot in customer interaction, marketing on social
network sites, and instant messaging the client. It delivers automated responses to user inputs.
It uses machine learning and deep learning algorithms to generate different types of reactions.

The next important deep learning application is related to Healthcare.

3. Healthcare

Deep Learning has found its application in the Healthcare sector. Computer-aided disease
detection and computer-aided diagnosis have been possible using Deep Learning. It is widely
used for medical research, drug discovery, and diagnosis of life-threatening diseases such as
cancer and diabetic retinopathy through the process of medical imaging.

4. Entertainment

Companies such as Netflix, Amazon, YouTube, and Spotify give relevant movies, songs, and
video recommendations to enhance their customer experience. This is all thanks to Deep
Learning. Based on a person’s browsing history, interest, and behavior, online streaming
companies give suggestions to help them make product and service choices. Deep learning
techniques are also used to add sound to silent movies and generate subtitles automatically.

Next, we have News Aggregation as our next important deep learning application.

5. News Aggregation and Fake News Detection

Deep Learning allows you to customize news depending on the readers’ persona. You can
aggregate and filter out news information as per social, geographical, and economic
parameters and the individual preferences of a reader. Neural Networks help develop
classifiers that can detect fake and biased news and remove it from your feed. They also warn
you of possible privacy breaches.

6. Composing Music

A machine can learn the notes, structures, and patterns of music and start producing music
independently. Deep Learning-based generative models such as WaveNet can be used to
develop raw audio. Long Short Term Memory Network helps to generate music
automatically. Music21 Python toolkit is used for computer-aided musicology. It allows us to
train a system to develop music by teaching music theory fundamentals, generating music
samples, and studying music.

Next in the list of deep learning applications, we have Image Coloring.


7. Image Coloring

Image colorization has seen significant advancements using Deep Learning. Image
colorization is taking an input of a grayscale image and then producing an output of a
colorized image. ChromaGAN is an example of a picture colorization model. A generative
network is framed in an adversarial model that learns to colorize by incorporating a
perceptual and semantic understanding of both class distributions and color.

8. Robotics

Deep Learning is heavily used for building robots to perform human-like tasks. Robots
powered by Deep Learning use real-time updates to sense obstacles in their path and pre-plan
their journey instantly. It can be used to carry goods in hospitals, factories, warehouses,
inventory management, manufacturing products, etc.

Boston Dynamics robots react to people when someone pushes them around, they can unload
a dishwasher, get up when they fall, and do other tasks as well.

Now, let’s understand our next deep learning application, i.e. Image captioning.
9. Image Captioning

Image Captioning is the method of generating a textual description of an image. It uses


computer vision to understand the image's content and a language model to turn the
understanding of the image into words in the right order. A recurrent neural network such as
an LSTM is used to turn the labels into a coherent sentence. Microsoft has built its caption
bot where you can upload an image or the URL of any image, and it will display the textual
description of the image. Another such application that suggests a perfect caption and best
hashtags for a picture is Caption AI.

10. Advertising

In Advertising, Deep Learning allows optimizing a user's experience. Deep Learning helps
publishers and advertisers to increase the significance of the ads and boosts the advertising
campaigns. It will enable ad networks to reduce costs by dropping the cost per acquisition of
a campaign from $60 to $30. You can create data-driven predictive advertising, real-time
bidding of ads, and target display advertising.

You might also like