Skip to content
DeepForgeby svx
All problems
MediumComputer Visioncv-243

Bottleneck Block Param Count

Problem

Count the convolution parameters of a ResNet bottleneck block, excluding bias and batch normalization.

The three convolutions are 1x1 (cin -> mid), 3x3 (mid -> mid) and 1x1 (mid -> cout). Return the total.

Test cases

case 1
in: [256,64,256]
expected: 69632
case 2
in: [64,64,256]
expected: 57344
case 3
in: [128,32,128]
expected: 17408
Starter codePython
def bottleneck_params(cin, mid, cout):
    # Your code here
    pass

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