Oulu-IMEDS / pytorch_bn_fusion

Batch normalization fusion for PyTorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

has a bug in utils.py in BottleneckResnetBlock

ghzhangnj opened this issue · comments

BottleneckResnetBlock‘s forwad function lack of 'out += residual' in resnet structure

@ghzhangnj Could you provide a quantitative comparison between the resnet50 and resnet50 after the batch norm fusion?

The included modules were adapted from the original PyTorch implementation.

commented

https://github.com/MIPT-Oulu/pytorch_bn_fusion/blob/2f97390a0dd200f73725afaf3d84ed19780175dd/utils.py#L135
should be

    if self.se_module is not None:
         out += self.se_module(out)
    out += residual

@xuyuan could you make a PR with the fix?