-
Notifications
You must be signed in to change notification settings - Fork 3
/
Bottleneck.patch
24 lines (24 loc) · 1.16 KB
/
Bottleneck.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- /home/asmita/Work/fine-tuning-pytorch/networks/resnet.py
+++ /home/asmita/Work/fine-tuning-pytorch/networks/resnet.py
@@ -4,15 +4,15 @@
def __init__(self, inplanes, planes, stride=1, downsample=None):
super(Bottleneck, self).__init__()
self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=1, bias=False)
- # self.bn1 = nn.BatchNorm2d(planes)
- self.bn1 = MyBatchNorm2d(planes)
+ self.bn1 = nn.BatchNorm2d(planes)
+ # self.bn1 = MyBatchNorm2d(planes)
self.conv2 = nn.Conv2d(planes, planes, kernel_size=3, stride=stride,
padding=1, bias=False)
- # self.bn2 = nn.BatchNorm2d(planes)
- self.bn2 = MyBatchNorm2d(planes)
+ self.bn2 = nn.BatchNorm2d(planes)
+ # self.bn2 = MyBatchNorm2d(planes)
self.conv3 = nn.Conv2d(planes, planes * 4, kernel_size=1, bias=False)
- # self.bn3 = nn.BatchNorm2d(planes * 4)
- self.bn3 = MyBatchNorm2d(planes * 4)
+ self.bn3 = nn.BatchNorm2d(planes * 4)
+ # self.bn3 = MyBatchNorm2d(planes * 4)
self.relu = nn.ReLU(inplace=True)
self.downsample = downsample
self.stride = stride