Strange question, number of filters

When I use conv2d(1,13,5). I know that I am having as output 13 filters of size 5x5. The question, is that I need it to the output channel value to stay as it is but can I change the number of the resulting filters to 5 somehow. I do not see a solution but I want to do that

Each filter will create an output channel. If you want to use 5 filters only, you could repeat these filters, but you would of course get redundant output information.

Alternatively you could also use a 1x1 convolution after this layer and output 5 channels, if that would fit your use case.

Could you explain a bit, what you are trying to achieve? Maybe I’m misunderstanding the question.