Skip to content
DeepForgeby svx
All problems
EasyComputer Visioncv-328

U-Net Skip Concatenation Channels

Problem

Compute the channel count after each U-Net skip concatenation.

At every level the upsampled decoder feature with decoder_channels[i] channels is concatenated with the encoder skip with encoder_channels[i] channels. Return the concatenated channel counts in order.

Test cases

case 1
in: [[64,128,256,512],[512,256,128,64]]
expected: [576,384,384,576]
case 2
in: [[16],[32]]
expected: [48]
case 3
in: [[32,64],[64,32]]
expected: [96,96]
Starter codePython
def unet_skip_channels(encoder_channels, decoder_channels):
    # Your code here
    pass

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