Image reconstruction with 4 channel image

Hi there,

I am dealing with an image reconstruction task with 4 channel image. After applying model surgery, as in here, by changing the first convolutional layer’s input channel to 4, I ended up having (batch_size, 3, height, width) output tensors.

However, input image still contains 4 channels and it raises a mismatch error when using L1 loss, as expected. I discarded the last channel of input image but it doesnt seem like a convenient approach to me. Any suggestions on this?

Thanks

Hey. Why not change the model, so reconstructed output tensor will be of shape (batch_size, 4, height, width)?

Hi!
Let me give it a try. Thanks for the suggestion.