Skip to content
DeepForgeby svx
All problems
EasyComputer Visioncv-220

Feature Map Channel Mean

Problem

Compute the mean activation of each channel in an H x W x C feature map.

Return one value per channel rounded to 4 decimal places.

Test cases

case 1
in: [[[[1,2],[3,4]],[[5,6],[7,8]]]]
expected: [4,5]
case 2
in: [[[[10,0,5]]]]
expected: [10,0,5]
case 3
in: [[[[2,4],[6,8]],[[1,1],[1,1]]]]
expected: [2.5,3.5]
Starter codePython
def channel_mean(feature):
    # Your code here
    pass

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