Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why are there not bias terms in the CNN model? #67

Open
MBleeker opened this issue Feb 22, 2018 · 3 comments
Open

Why are there not bias terms in the CNN model? #67

MBleeker opened this issue Feb 22, 2018 · 3 comments

Comments

@MBleeker
Copy link

No description provided.

@da03
Copy link
Owner

da03 commented Feb 22, 2018

Sorry I didn't quite get it. What do you mean by bias terms?

@MBleeker
Copy link
Author

MBleeker commented Feb 22, 2018

Most convolutions in the literature are implemented as x^T w + b

For example in vgg16 a conv layer is defined as (in TF code):

conv = tf.nn.conv2d(bottom, filt, [1, 1, 1, 1], padding='SAME')
conv_biases = self.get_bias(name)
bias = tf.nn.bias_add(conv, conv_biases)
relu = tf.nn.relu(bias)

Is there a reason that you are not using bias terms in your conv model? I assume that bias terms are not needed when you apply batch norm after a convolution

@da03
Copy link
Owner

da03 commented Feb 22, 2018

I see. Yes you're right, since we apply batch norm before ReLU's, anyway the features are recentered such that bias terms are not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants