All problems
FPN Lateral Parameter Count
Problem
Count the parameters of the 1x1 lateral convolutions in an FPN.
Each level has a c_in to fpn_dim convolution with a bias, contributing c_in * fpn_dim + fpn_dim parameters. Return the total over all backbone channels.
Test cases
case 1
in: [[256,512,1024,2048],256]
expected: 984064
case 2
in: [[64],16]
expected: 1040
case 3
in: [[32,64,128],32]
expected: 7264
Starter codePython
def fpn_lateral_params(backbone_channels, fpn_dim):
# Your code here
pass3 test cases · run your code against them in the editor