You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/31 07:30:31 UTC

[GitHub] szha closed pull request #9215: Adding multiple pretrained models

szha closed pull request #9215: Adding multiple pretrained models
URL: https://github.com/apache/incubator-mxnet/pull/9215
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/python/mxnet/gluon/model_zoo/model_store.py b/python/mxnet/gluon/model_zoo/model_store.py
index bb549748e4..1a7dc545b5 100644
--- a/python/mxnet/gluon/model_zoo/model_store.py
+++ b/python/mxnet/gluon/model_zoo/model_store.py
@@ -31,14 +31,20 @@
     ('2603f878403c6aa5a71a124c4a3307143d6820e9', 'densenet169'),
     ('1cdbc116bc3a1b65832b18cf53e1cb8e7da017eb', 'densenet201'),
     ('ed47ec45a937b656fcc94dabde85495bbef5ba1f', 'inceptionv3'),
-    ('d2b128fa89477c2e20061607a53a8d9f66ce239d', 'resnet101_v1'),
-    ('6562166cd597a6328a32a0ce47bb651df80b3bbb', 'resnet152_v1'),
+    ('9f83e440996887baf91a6aff1cccc1c903a64274', 'mobilenet0.25'),
+    ('8e9d539cc66aa5efa71c4b6af983b936ab8701c3', 'mobilenet0.5'),
+    ('529b2c7f4934e6cb851155b22c96c9ab0a7c4dc2', 'mobilenet0.75'),
+    ('6b8c5106c730e8750bcd82ceb75220a3351157cd', 'mobilenet1.0'),
     ('38d6d423c22828718ec3397924b8e116a03e6ac0', 'resnet18_v1'),
     ('4dc2c2390a7c7990e0ca1e53aeebb1d1a08592d1', 'resnet34_v1'),
-    ('2a903ab21260c85673a78fe65037819a843a1f43', 'resnet50_v1'),
+    ('c940b1a062b32e3a5762f397c9d1e178b5abd007', 'resnet50_v1'),
+    ('d992389084bc5475c370e9b52c3561706e755799', 'resnet101_v1'),
+    ('48ce7775d375987d019ec9aa96bc43b98165dfcb', 'resnet152_v1'),
     ('8aacf80ff4014c1efa2362a963ac5ec82cf92d5b', 'resnet18_v2'),
     ('0ed3cd06da41932c03dea1de7bc2506ef3fb97b3', 'resnet34_v2'),
-    ('eb7a368774aa34a12ed155126b641ae7556dad9d', 'resnet50_v2'),
+    ('81a4e66af7859a5aa904e2b4051aa0d3bc472b2f', 'resnet50_v2'),
+    ('7eb2b3cde097883c11941b927048a705ed334294', 'resnet101_v2'),
+    ('64c75ac8c292f6ac54f873f9ef62e0531105878b', 'resnet152_v2'),
     ('264ba4970a0cc87a4f15c96e25246a1307caf523', 'squeezenet1.0'),
     ('33ba0f93753c83d86e1eb397f38a667eaf2e9376', 'squeezenet1.1'),
     ('dd221b160977f36a53f464cb54648d227c707a05', 'vgg11'),
diff --git a/python/mxnet/gluon/model_zoo/vision/mobilenet.py b/python/mxnet/gluon/model_zoo/vision/mobilenet.py
index 0ba0933209..34d849029c 100644
--- a/python/mxnet/gluon/model_zoo/vision/mobilenet.py
+++ b/python/mxnet/gluon/model_zoo/vision/mobilenet.py
@@ -28,7 +28,7 @@
 # Helpers
 def _add_conv(out, channels=1, kernel=1, stride=1, pad=0, num_group=1):
     out.add(nn.Conv2D(channels, kernel, stride, pad, groups=num_group, use_bias=False))
-    out.add(nn.BatchNorm(scale=False))
+    out.add(nn.BatchNorm(scale=True))
     out.add(nn.Activation('relu'))
 
 def _add_conv_dw(out, dw_channels, channels, stride):
diff --git a/python/mxnet/gluon/model_zoo/vision/resnet.py b/python/mxnet/gluon/model_zoo/vision/resnet.py
index 4474aee839..fa86c646ae 100644
--- a/python/mxnet/gluon/model_zoo/vision/resnet.py
+++ b/python/mxnet/gluon/model_zoo/vision/resnet.py
@@ -102,10 +102,10 @@ class BottleneckV1(HybridBlock):
     def __init__(self, channels, stride, downsample=False, in_channels=0, **kwargs):
         super(BottleneckV1, self).__init__(**kwargs)
         self.body = nn.HybridSequential(prefix='')
-        self.body.add(nn.Conv2D(channels//4, kernel_size=1, strides=1))
+        self.body.add(nn.Conv2D(channels//4, kernel_size=1, strides=stride))
         self.body.add(nn.BatchNorm())
         self.body.add(nn.Activation('relu'))
-        self.body.add(_conv3x3(channels//4, stride, channels//4))
+        self.body.add(_conv3x3(channels//4, 1, channels//4))
         self.body.add(nn.BatchNorm())
         self.body.add(nn.Activation('relu'))
         self.body.add(nn.Conv2D(channels, kernel_size=1, strides=1))


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services