Unit 6
Unit 6
Unit-6
Dr. D. SUDHEER
Assistant Professor
Department of CSE
VNR VJIET (NAAC: A++, NIRF: 113)
Hyderabad, Telangana.
Problems ?
©Dr. SUDHEER DEVULAPALLI 4
How to apply NN over Image?
Multi-layer Neural Network & Image
Stretch pixels in single column vector
High dimensionality
Problems ? Local relationship
High dimensionality
Solutions ? Local relationship
Number of parameters:
Global connectivity:?
Local connectivity: ?
Number of parameters:
Global connectivity:3*7=21
Local connectivity: 3*3=9
Number of parameters:
Without weight sharing:3*3=9
With weight sharing: 3*1=3
•Historically, these networks have been difficult to train, but more recently,
advances in research (optimization, network architectures, parallelism, and
graphics processing units [GPUs]) have made them more approachable for the
practitioner.
• Recurrent Neural Networks take each vector from a sequence of input
vectors and model them one at a time.
• Modeling the time dimension is a hallmark of Recurrent Neural Networks.
Modeling the Time Dimension:
• Recurrent Neural Networks are considered Turing complete and can simulate
arbitrary programs (with weights).
• Recurrent neural networks are well suited for modeling functions for which
the input and/or output is composed of vectors that involve a time dependency
between the values.
• Recurrent neural networks model the time aspect of data by creating cycles
in the network (hence, the “recurrent” part of the name).©Dr. SUDHEER DEVULAPALLI 29
Lost in Time:
• Many classification tools (support vector machines, logistic regression, and
regular feed-forward networks) have been applied successfully without
modeling the time dimension, assuming independence.
• Other variations of these tools capture the time dynamic by modeling a
sliding window of the input (e.g., the previous, current, and next input together
as a single input vector).
• A drawback of these tools is that assuming independence in the time
connection between model inputs does not allow our model to capture long-
range time dependencies.
• Sliding window techniques have a limited window width and will fail to
capture any effects larger than the fixed window size.
• Good example is automatic replies by machines for conversations over time.
• Image captioning
•Speech synthesis
•Music generation
•Playing video games
•Language modeling
•Character-level text generation models
A
LSTM
LSTM
Long-term-memory Short-term-memory
New updated
information ©Dr. SUDHEER DEVULAPALLI 38
Layers of RNN
There two important layers: 1. Embedding 2. LSTM
1. Embedding
• It is useful to convert positive integers to vector of values.
• Fixed range of input values should be provide this layer.
• It will be more useful in language translation to understand the meaning.
Embedding(input_dim,output_dim,input_length)
Applications of LSTM:
• Image caption generation.
• Text translation.
• Hand writing recognition.
Limitations of LSSTM:
• In time series forecasting, often the information relevant for making a
forecast is within a small window of past observations. Often an MLP with a
window or a linear model may be a less complex and more suitable model.
• An important limitation of LSTMs is the memory