This is an automated email from the ASF dual-hosted git repository.

zhreshold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 8168292  fix hard-coded in_channels in gluon model zoo resnet (#9341)
8168292 is described below

commit 8168292280124224bfbdff5abf261d2ad2105c66
Author: Sheng Zha <[email protected]>
AuthorDate: Mon Jan 8 21:25:23 2018 -0800

    fix hard-coded in_channels in gluon model zoo resnet (#9341)
---
 python/mxnet/gluon/model_zoo/vision/resnet.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/python/mxnet/gluon/model_zoo/vision/resnet.py 
b/python/mxnet/gluon/model_zoo/vision/resnet.py
index fa86c64..bc7cfef 100644
--- a/python/mxnet/gluon/model_zoo/vision/resnet.py
+++ b/python/mxnet/gluon/model_zoo/vision/resnet.py
@@ -249,10 +249,9 @@ class ResNetV1(HybridBlock):
         with self.name_scope():
             self.features = nn.HybridSequential(prefix='')
             if thumbnail:
-                self.features.add(_conv3x3(channels[0], 1, 3))
+                self.features.add(_conv3x3(channels[0], 1, 0))
             else:
-                self.features.add(nn.Conv2D(channels[0], 7, 2, 3, 
use_bias=False,
-                                            in_channels=3))
+                self.features.add(nn.Conv2D(channels[0], 7, 2, 3, 
use_bias=False))
                 self.features.add(nn.BatchNorm())
                 self.features.add(nn.Activation('relu'))
                 self.features.add(nn.MaxPool2D(3, 2, 1))
@@ -306,10 +305,9 @@ class ResNetV2(HybridBlock):
             self.features = nn.HybridSequential(prefix='')
             self.features.add(nn.BatchNorm(scale=False, center=False))
             if thumbnail:
-                self.features.add(_conv3x3(channels[0], 1, 3))
+                self.features.add(_conv3x3(channels[0], 1, 0))
             else:
-                self.features.add(nn.Conv2D(channels[0], 7, 2, 3, 
use_bias=False,
-                                            in_channels=3))
+                self.features.add(nn.Conv2D(channels[0], 7, 2, 3, 
use_bias=False))
                 self.features.add(nn.BatchNorm())
                 self.features.add(nn.Activation('relu'))
                 self.features.add(nn.MaxPool2D(3, 2, 1))

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to