Skip to content

Commit

Permalink
Match the maxpool.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruotianluo committed Sep 8, 2017
1 parent 9d4c24e commit c899ce7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/nets/resnet_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def __init__(self, block, layers, num_classes=1000):
bias=False)
self.bn1 = nn.BatchNorm2d(64)
self.relu = nn.ReLU(inplace=True)
# Note that, tf-faster-rcnn use padding 1 maxpool instead of ceil_mode, but it doesn't affect the output much
self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=0, ceil_mode=True) # change
# maxpool different from pytorch-resnet, to match tf-faster-rcnn
self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=1)
self.layer1 = self._make_layer(block, 64, layers[0])
self.layer2 = self._make_layer(block, 128, layers[1], stride=2)
self.layer3 = self._make_layer(block, 256, layers[2], stride=2)
Expand Down

0 comments on commit c899ce7

Please sign in to comment.