keras-cv
keras-cv copied to clipboard
Redundant bias paramter in ResNet's conv2d.
Short description
In tf.keras
by default Conv2D has bias enabled. We should explicitly set use_bias=False
if the convolution layer is followed by BatchNormalization.
This is the done in some existing Keras-CV implementations:
But not in resnet_v1
- all ResNet's have bias enabled, which causes redundant computation and is not aligned with other implementations.
I think this is rather a quick fix - add use_bias=False
parameter to the Conv2d's in the Block
function. If you approve I could submit a PR.
Gently pinging @LukeWood for opinion / green light here.
Interesting, could you send a PR so we can verify this? I think you're correct, but I would like to see the updated code.
@LukeWood yes, submitted the PR here https://github.com/keras-team/keras-cv/pull/697