<p>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:</p>
<p><a href="https://i.sstatic.net/s6Pal.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/s6Pal.jpg" alt="enter image description here" /></a></p>
<p><a href="https://i.sstatic.net/yJlQo.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yJlQo.jpg" alt="enter image description here" /></a></p>
<ul>
<li><span class="math-container">$I$</span> is the input single-channel image.</li>
<li><span class="math-container">$F$</span> is the filter.</li>
<li><span class="math-container">$b$</span> is the bias.</li>
<li>&quot;Izhod&quot; means &quot;output&quot;.</li>
</ul>
<p>Which is actually the correct bias used in CNN?</p>

CC BY-SA 4.0
2021-06-12T02:11:20.670Z
Hello. Where did you take this diagram from?
nbro
CC BY-SA 4.0
2021-06-12T11:42:55.330Z
I drew it myself. The idea that bias is a single number and not a matrix came from
https://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 https://youtu.be/Lakz2MoHy6o?t=343 at the 5:00 mark.
kranj doo
<convolutional-neural-networks><feature-extraction><bias>
How is the bias added after the convolution in a CNN?
kranj doo
# How is the bias added after the convolution in a CNN?

(Asked by: username_0 on 2021-06-11)

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:

[![enter image description here](https://i.sstatic.net/s6Pal.jpg)](https://i.sstatic.net/s6Pal.jpg)

[![enter image description here](https://i.sstatic.net/yJlQo.jpg)](https://i.sstatic.net/yJlQo.jpg)

* $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?

**Tags:** convolutional-neural-networks, feature-extraction, bias

> **Comments:**
> **username_1**: Hello. Where did you take this diagram from?  
> **username_0**: I drew it myself. The idea that bias is a single number and not a matrix came from https://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 https://youtu.be/Lakz2MoHy6o?t=343 at the 5:00 mark.  

---

## 0 answers

