Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Use bias only for He's ResNet50 #621

Merged
merged 3 commits into from
May 28, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
use bias only for He's ResNet50
  • Loading branch information
yuyu2172 committed May 26, 2018
commit 6ef011ef6f2be36d94801f1420860fe071be5937
3 changes: 2 additions & 1 deletion chainercv/links/model/resnet/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ def __init__(self, n_layer,
conv1_no_bias = True
elif arch == 'he':
stride_first = True
conv1_no_bias = False
# Kaiming He uses bias only for ResNet50
conv1_no_bias = False if n_layer == 50 else True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about conv1_no_bias = not n_layer == 50?

else:
raise ValueError('arch is expected to be one of [\'he\', \'fb\']')
blocks = self._blocks[n_layer]
Expand Down