diff --git a/models/shufflenet.py b/models/shufflenet.py index acff6f782..6e19aec50 100644 --- a/models/shufflenet.py +++ b/models/shufflenet.py @@ -24,7 +24,7 @@ def __init__(self, in_planes, out_planes, stride, groups): super(Bottleneck, self).__init__() self.stride = stride - mid_planes = out_planes/4 + mid_planes = out_planes//4 g = 1 if in_planes==24 else groups self.conv1 = nn.Conv2d(in_planes, mid_planes, kernel_size=1, groups=g, bias=False) self.bn1 = nn.BatchNorm2d(mid_planes)