All problems
FPN Lateral 1x1
Problem
Apply a 1x1 lateral convolution implemented as per-channel scaling.
Multiply channel c of every pixel by scales[c] and round to 4 decimal places.
Test cases
case 1
in: [[[[1,2],[3,4]]],[2,3]]
expected: [[[2,6],[6,12]]]
case 2
in: [[[[10,0,5]]],[0.5,2,1]]
expected: [[[5,0,5]]]
case 3
in: [[[[1,2],[3,4]]],[1,0]]
expected: [[[1,0],[3,0]]]
Starter codePython
def lateral_scale(feature, scales):
# Your code here
pass3 test cases · run your code against them in the editor