Prep 1
Prep 1
C 514 - Com r Vi on E D vi
Ap i 25, 2024
Cat
Dog
Tiger
Cow
Lion
64 x 64 x 3
Convolution Layer
The convolution layer (CONV) uses lters that perform convolution operations as it is scanning the input I with respect to its dimensions. Its
hyperparameters include the lter size and stride . The resulting output is called feature map or activation map.
F F F F
I I I I
Step 1 Step 2 Step 3 Step 4
F F F
I I
Step 5 Step 6 Last Step
𝑂
𝑂
𝑂
𝑂
𝑂
𝑂
𝑂
fi
fi
𝐹
𝑆
𝑂
Max Pooling Layer
Each pooling operation selects the maximum value of the current view
fl
Q1
Convolutions
What is the dimension of the
=
feature map produced by the
following convolution operation?
Draw the output feature map and
write the width and height of the
feature map below the gure.
• Stride = 1
• Padding = 0
• Filter:
1 1 0
Input Output
1 1 1 ( 5 x 5) ( ____ x ____ )
1 0 1
Convolution
What is the dimension of the
=
feature map produced by the
following convolution operation?
Draw the output feature map and
write the width and height of the
feature map below the gure.
• Stride = 1
• Padding = 0
• Filter:
1 1 0
Input Output
1 1 1 ( 5 x 5) (3x3)
1 0 1
1 1 0 3 0 6 1 2
1 1 1
Input Output
1 0 1
( 5 x 5) (3x3)
1 1 0 3 0 6 1 2
1 1 1
Input Output
1 0 1
( 5 x 5) (3x3)
Convolution
Draw the padded input using the
convolution settings below? Also
=
specify the dimension of the new
input?
Convolution Settings:
• Stride = 1
• Padding = 1
Input
( 5 x 5)
New Input
( ____ x ____)
Convolution
Draw the padded input using the
convolution settings below? Also
=
specify the dimension of the new
input?
Convolution Settings:
• Stride = 1
• Padding = 1
Input
( 5 x 5)
New Input
( ____ x ____)
Convolutions
What is the dimension of the
=
feature map produced by the
following convolution operation?
Draw the output feature map and
write the width and height of the
feature map below the gure.
• Stride = 2
• Padding = 0
• Filter:
1 1 0
1 1 1 Input Output
1 0 1
( 5 x 5) ( ____ x ____ )
Convolutions
What is the dimension of the
=
feature map produced by the
following convolution operation?
Draw the output feature map and
write the width and height of the
feature map below the gure.
• Stride = 2
• Padding = 0
• Filter:
1 1 0
1 1 1 Input Output
1 0 1
( 5 x 5) (2x2)
Convolutions
What is the dimension of the
feature map produced by the
following convolution operation?
Draw the output feature map and
specify the width and height of
=
the feature map.
• Stride = 1 Filter
Output
( 3 x 3 x 3)
• Padding = 0 ( ____ x ____ )
Input
( 6 x 6 x 3)
A5
Convolutions
What is the dimension of the
feature map produced by the
following convolution operation?
Draw the output feature map and
specify the width and height of
=
the feature map.
• Stride = 1 Filter
Output
( 3 x 3 x 3)
• Padding = 0 (4x4)
Input
( 6 x 6 x 3)
Q6
=
Convolutions Filter Feature Map 1
What is the dimension of the ( 3 x 3 x 3)
(4x4)
feature map produced by the
following convolution operation?
Draw the output feature map and
specify the width and height of
=
the feature map.
• Stride = 1 Output
• Padding = 0 (__ x__ x__)
=
the feature map.
• Stride = 1 Output
• Padding = 0 (4x4x2)
Input Filter Feature Map 2
( 6 x 6 x 3) ( 3 x 3 x 3)
(4x4)
Q7
Deconvolutions
What is the dimension of the feature
map produced by the following
deconvolution operation? Draw the
output feature map and write the
width and height of the feature map
below the gure.
=
• Stride = 1
• Padding = 0
• Filter:
1 1 0
1 1 1 Input Output
1 0 1
( 3 x 3) ( ____ x ____ )
Deconvolutions
What is the dimension of the feature
map produced by the following
deconvolution operation? Draw the
output feature map and write the
width and height of the feature map
below the gure.
=
• Stride = 1
• Padding = 0
• Filter:
1 1 0
1 1 1 Input Output
1 0 1
( 3 x 3) (5x5)
• Filter:
0 0 0 0 0 0 0
1 1 0
1 1 1 Input Output
1 0 1
( 3 x 3) (5x5)
• Filter:
0 0 0 0 0 0 0
1 1 0
1 1 1 Input Output
1 0 1
( 3 x 3) (5x5)
Convolution
Layer
Computer the number of
parameters and memory size of
the convolution layer depicted in
the following.
Not o s
ci : nu r i p h el
co : nu r o p ha l
wi : in w h
hi : in h i t
wo : o t wi h
ho : o t he t
k: l e s Parameters = _________ Memory = _________
Par er = (ci x k + 1) x o
Mem = (wi x i x o)
fi
a
a
o
m
t
t
u
u
p
r
p
m
i
m
e
u
y
r
u
p
p
t
b
n
t
b
t
u
u
e
e
t
t
i
z
s
e
e
i
o
d
o
g
f
t
f
d
i
h
g
t
n
h
u
h
t
u
t
u
k
t
c
c
x
c
a
n
n
n
n
s
e
s
c
A9
Convolution Layer
Convolution
Layer
Computer the number of
parameters and memory size of
the convolution layer depicted in
the following.
Not o s
ci : nu r i p h el
co : nu r o p ha l
wi : in w h
hi : in h i t
wo : o t wi h
ho : o t he t
k: l e s Parameters = (3 x 4 x 4 + 1) x 2 = 98 Memory = (6 x 6 x 2 ) = 72
Par er = (ci x k + 1) x o
Mem = (wi x i x o)
fi
a
a
o
m
t
t
u
u
p
r
p
m
i
m
e
u
y
r
u
p
p
t
b
n
t
b
t
u
u
e
e
t
t
i
z
s
e
e
i
o
d
o
g
f
t
f
d
i
h
g
t
n
h
u
h
t
u
t
u
k
t
c
c
x
c
a
n
n
n
n
s
e
s
c
Q10
MaxPooling
Layer MaxPooling
Compute the output of the • Stride = 2
• Filter size = (2 x 2)
following max pooling operation.
Output
( 3 x 3 x 3)
Input
( 6 x 6 x 3)
A10
MaxPooling
Layer MaxPooling
Compute the output of the • Stride = 2
• Filter size = (2 x 2)
following max pooling operation. 9 5 8
6 5 8
8 9 8
Output
( 3 x 3 x 3)
Input
( 6 x 6 x 3)
Q11
Relu Activation
Layer
Compute the output of the
Relu Activation
following recti ed linear
activation operation.
Input
Output
( 4 x 4 x 3)
( 4 x 4 x 3)
fi
A11
Relu Activation
Layer
Compute the output of the 1 0 2 0
following recti ed linear
activation operation. 0 0 4 3
0 0 0 0
0 4 4 2
Input
Output
( 4 x 4 x 3)
( 4 x 4 x 3)
fi