-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix strides in basic block (affects
ResNet{18,34}
).
We (intentionally) implement ResNet V1.5 (downsamples at the second conv in bottleneck blocks, while original paper downsamples in the first conv) and V2. Before this change for basic blocks (as used in `ResNet{18,34}` and when passing `ResNet(.., bottleneck=False)`) we also downsampled in the second conv. This is a bug, for basic blocks downsampling should occur in the first conv. This bug actually improved performance in affected ResNets (for standard training on ImageNet this patch causes a -1.0% regression in top_1 accuracy for ResNet18 and -0.5% for ResNet34). We are submitting it anyway to remain faithful to the paper. ![tensorboard](https://user-images.githubusercontent.com/28017/102883943-b3371e00-4448-11eb-9ee5-93e5e9b47225.png) Fixes #85. PiperOrigin-RevId: 348638376 Change-Id: I8849cbf22ae587fc597805c4420043f471efa80a
- Loading branch information
1 parent
3a20795
commit 300e6a4
Showing
1 changed file
with
61 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters