Closed tccfree closed 3 years ago
Nope, this is the paper baseline architecture, just look Figure 5 on the paper.
Nope, this is the paper baseline architecture, just look Figure 5 on the paper.
You are right, it is the baseline. Actually Kaiming He discussed these two different residual units in another paper《Identity Mappings in Deep Residual Networks》.
In your resnet.py file, the forward function of BasicBlock calss returns the relu of the sum of shortcut and the out variable, but shouldn't it return the sum of the shortcut and relu of the out variable? something like this : def forward(self, x): out = F.relu(self.bn1(self.conv1(x))) out = F.relu(self.bn2(self.conv2(out))) out += self.shortcut(x) return out