From ee42bb0cce63969c020ac35f44e4930fee6cb8cc Mon Sep 17 00:00:00 2001 From: Reinier Maat Date: Mon, 6 May 2019 14:44:13 -0400 Subject: [PATCH] Python 2 float/integer compatibility fix --- pretrainedmodels/__init__.py | 2 +- pretrainedmodels/models/senet.py | 2 +- pretrainedmodels/version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pretrainedmodels/__init__.py b/pretrainedmodels/__init__.py index 0187e4b3..69ded3d8 100644 --- a/pretrainedmodels/__init__.py +++ b/pretrainedmodels/__init__.py @@ -7,7 +7,7 @@ from .models.utils import model_names # to support pretrainedmodels.__dict__['nasnetalarge'] -# but depreciated +# but deprecated from .models.fbresnet import fbresnet152 from .models.cafferesnet import cafferesnet101 from .models.bninception import bninception diff --git a/pretrainedmodels/models/senet.py b/pretrainedmodels/models/senet.py index 20bd122f..ceefe237 100644 --- a/pretrainedmodels/models/senet.py +++ b/pretrainedmodels/models/senet.py @@ -189,7 +189,7 @@ class SEResNeXtBottleneck(Bottleneck): def __init__(self, inplanes, planes, groups, reduction, stride=1, downsample=None, base_width=4): super(SEResNeXtBottleneck, self).__init__() - width = math.floor(planes * (base_width / 64)) * groups + width = int(math.floor(planes * (base_width / 64)) * groups) self.conv1 = nn.Conv2d(inplanes, width, kernel_size=1, bias=False, stride=1) self.bn1 = nn.BatchNorm2d(width) diff --git a/pretrainedmodels/version.py b/pretrainedmodels/version.py index a9df0271..ce5153af 100644 --- a/pretrainedmodels/version.py +++ b/pretrainedmodels/version.py @@ -1,2 +1,2 @@ from __future__ import print_function, division, absolute_import -__version__ = '0.7.4' +__version__ = '0.7.5'