facebookarchive / fb.resnet.torch

Torch implementation of ResNet from http://arxiv.org/abs/1512.03385 and training scripts
Other
2.29k stars 664 forks source link

Missing batch norm in ResNet-18 weights #191

Closed ondrejbiza closed 6 years ago

ondrejbiza commented 7 years ago

While converting the ResNet-18 pre-trained weights to Tensorflow, I have noticed that some batch normalization layers are missing.

Specifically, when a convolution is applied to a residual connection in order to reduce its spatial resolution, there is no batch normalization after the convolution.

I.e.

main branch: Conv->BN->ReLU->Conv->BN
skip branch: Conv (missing BN)
output: (main branch + skip branch)->ReLU
ondrejbiza commented 7 years ago

I've found an issue that deals with the exact same thing just now (https://github.com/facebook/fb.resnet.torch/issues/49). I'm sorry for opening a new issue for this.