Keras-yolo3: Why use as Conv2D use_bias=not batch_normalize in Convert Model

Created on 30 Nov 2018  路  2Comments  路  Source: qqwweee/keras-yolo3

in convert.py line 168 , why as batch_normalize on will set use_bias to False ?
conv_layer = (Conv2D(
filters, (size, size),
strides=(stride, stride),
kernel_regularizer=l2(weight_decay),
use_bias=not batch_normalize,
weights=conv_weights,
activation=act_fn,
padding=padding))(prev_layer)

Most helpful comment

BatchNorm layers will shift activations by their mean values, so there's no point in adding any constants anyways 鈥撀爏etting use_bias=False saves time and memory here.

All 2 comments

BatchNorm layers will shift activations by their mean values, so there's no point in adding any constants anyways 鈥撀爏etting use_bias=False saves time and memory here.

BatchNorm layers will shift activations by their mean values, so there's no point in adding any constants anyways 鈥撀爏etting use_bias=False saves time and memory here.

impressive answer

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dmadhitama picture dmadhitama  路  5Comments

ISSstone picture ISSstone  路  5Comments

dongdyang picture dongdyang  路  6Comments

Exorcismus picture Exorcismus  路  3Comments

jinbooooom picture jinbooooom  路  4Comments