Convolutional and recurrent networks
XX Seminar on Software for Nuclear, Subnuclear and Applied Physics
Alghero, 4-9 June 2023
1
Topics
2
Classification of images
3
………….
Exploit invariance and locality
4
Can we exploit problem invariance?
5
Limitations
6
Understanding the dimensions of the convolution
7
2D-conv (on 6x6x3 image)
3x3 kernel
no padding
5 filters
5 filters
Pooling (subsampling)
8
Typical CNN architecture
9
More on convolution
10
Bounding Box
In order to predict “where” an object is a “bounding box” is defined
Not simple to extend to multiple objects in a single image, YOLO (You Only Look Once) algorithm is an option https://pjreddie.com/darknet/yolo/
11
Transfer learning
12
Variable length, sequences and causality
13
Exploiting time invariance
Recurrent Networks (RNN)
14
LSTM and GRU
15
LSTM
GRU
Different ways of processing time series
16
Keras basic layers
17
channels_first vs channels_last
Clarifies which indices are part of the convolution and which indices are the “channels”
(#sample, X, Y, channels ) <- default
VS
(#sample, channels, X, Y )
More on LSTM
18
[array([[[0.02106816],
[0.05576485],
[0.09626514],
[0.13520567],
[0.16713278]]], dtype=float32),
array([[0.16713278]], dtype=float32),
array([[0.41894686]], dtype=float32)]
Using LSTM
19
Assignment 3
Create a CNN that recognize squares and circles in an image. Let’s try three variations:
https://colab.research.google.com/drive/1kRP1NfbL3hj9xIHAnfMEx9ug76ozGeqR
20
Assignment 4
Try building from scratch a LSTM that find the maximum length and its position in a sequence of two dimensional vectors.
21