How to change features size without padding in CNN?


I’m using a 2d CNN. My input size is a square image of 20x20 pixels and my desired output has size 400x3.

The most common thing I see is to introduce padding over the convolutional layers in order to reach the desired output size and let the nn train.

The output I get in this way is characterized by lots of zeros (sparse matrix) and obviously the performance is very low. So what else can I do? I tried to introduce more layers, each one characterized by smaller padding values but it doesn’t improve…

any hint will be really appreciated, thanks!

Is your input image actually 20x20x3? Why would you need an output to be the same size as your input?

My input image is just 20x20 and they have not the same size, since I my net input is 20x20 and the output is 400x3.

thank you