Skip to content
DeepForgeby svx
All problems
EasyDeep Learningdl-232

DeepLab Output Stride

Problem

Compute the spatial resolution after a chain of strided convolutions: the output stride is the product of the strides, and the resolution is ceil(input_size / product).

The signature is deeplab_output_resolution(input_size, strides). Return an integer.

Hint

Dilated convolutions let DeepLab keep output stride 16 or 8 without losing field of view.

Test cases

case 1
in: [224,[2,2,2,2]]
expected: 14
case 2
in: [128,[2,2,2]]
expected: 16
case 3
in: [65,[2,2]]
expected: 17
case 4
in: [64,[1,1]]
expected: 64
Starter codePython
def deeplab_output_resolution(input_size, strides):
    # Your code here
    pass

4 test cases · run your code against them in the editor