-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
basenet/examples/cifar/cifar10.py
Lines 118 to 122 in c61f558
| out = F.relu(self.bn1(x)) | |
| shortcut = self.shortcut(out) if hasattr(self, 'shortcut') else x | |
| out = self.conv1(out) | |
| out = self.conv2(F.relu(self.bn2(out))) | |
| return out + shortcut |
What is the motivation behind computing the batch norm and relu before sending the data into the convolutional layer?
In the implementation done by https://github.com/kuangliu/pytorch-cifar, the computation is done in the following order which seems more conventional, so I am curious why it is changed!
out = F.relu(self.bn1(self.conv1(x)))
out = self.bn2(self.conv2(out))
shortcut = self.shortcut(x) if hasattr(self, 'shortcut') else x
out += shortcut
out = F.relu(out)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels