Commit 0844f577 authored by 任广辉's avatar 任广辉 Committed by Francisco Massa

replace 'residual' with 'identity' (#338)

parent f25c6cff
......@@ -250,7 +250,7 @@ class BottleneckWithFixedBatchNorm(nn.Module):
self.bn3 = FrozenBatchNorm2d(out_channels)
def forward(self, x):
residual = x
identity = x
out = self.conv1(x)
out = self.bn1(out)
......@@ -264,9 +264,9 @@ class BottleneckWithFixedBatchNorm(nn.Module):
out = self.bn3(out0)
if self.downsample is not None:
residual = self.downsample(x)
identity = self.downsample(x)
out += residual
out += identity
out = F.relu_(out)
return out
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment