# How is the bias added after the convolution in a CNN?

I'm having trouble understanding how bias is added to the feature extraction convolution. I've seen people either refer to the bias as a single number that changes per filter or the whole matrix that is the size of the output. Here is what I mean:

• $$I$$ is the input single-channel image.
• $$F$$ is the filter.
• $$b$$ is the bias.
• "Izhod" means "output".

Which is actually the correct bias used in CNN?

New contributor
kranj doo is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• Hello. Where did you take this diagram from? – nbro Jun 12 at 2:11
• I drew it myself. The idea that bias is a single number and not a matrix came from cs231n.github.io/convolutional-networks under the Convolution demo where Bias is displayed as a 1x1x1 matrix. However the idea that the bias might actually be a whole matrix that is the size of the output came from this video youtu.be/Lakz2MoHy6o?t=343 at the 5:00 mark. – kranj doo Jun 12 at 11:42