Skip to content

Commit 9a469ec

Browse files
committed
Fix Oct-ResNet
1 parent ab4767d commit 9a469ec

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

oct_resnet.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import torch.nn as nn
2-
from .octconv import *
2+
from octconv import *
33

44

55
__all__ = ['OctResNet', 'oct_resnet26', 'oct_resnet50', 'oct_resnet101', 'oct_resnet152', 'oct_resnet200']
@@ -44,9 +44,6 @@ def forward(self, x):
4444
return x_h, x_l
4545

4646

47-
return x_h
48-
49-
5047
class OctResNet(nn.Module):
5148

5249
def __init__(self, block, layers, num_classes=1000, zero_init_residual=False,
@@ -84,8 +81,6 @@ def __init__(self, block, layers, num_classes=1000, zero_init_residual=False,
8481
for m in self.modules():
8582
if isinstance(m, Bottleneck):
8683
nn.init.constant_(m.bn3.weight, 0)
87-
elif isinstance(m, BasicBlock):
88-
nn.init.constant_(m.bn2.weight, 0)
8984

9085
def _make_layer(self, block, planes, blocks, stride=1, alpha_in=0.5, alpha_out=0.5, norm_layer=None, output=False):
9186
if norm_layer is None:

0 commit comments

Comments
 (0)