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

zhasheng 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 752be1d  fix superresolution example (#8106)
752be1d is described below

commit 752be1dc652d570b1e4770383c00ac3473eccc81
Author: Sheng Zha <[email protected]>
AuthorDate: Fri Sep 29 15:42:43 2017 -0700

    fix superresolution example (#8106)
---
 example/gluon/data.py             | 4 ++--
 example/gluon/super_resolution.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/example/gluon/data.py b/example/gluon/data.py
index 1af75f7..30c1a8c 100644
--- a/example/gluon/data.py
+++ b/example/gluon/data.py
@@ -166,9 +166,9 @@ class ImagePairIter(mx.io.DataIter):
                 image = mx.nd.expand_dims(mx.nd.array(image), axis=2)
                 target = image.copy()
                 for aug in self.input_aug:
-                    image = aug(image)[0]
+                    image = aug(image)
                 for aug in self.target_aug:
-                    target = aug(target)[0]
+                    target = aug(target)
                 data.append(image)
                 label.append(target)
 
diff --git a/example/gluon/super_resolution.py 
b/example/gluon/super_resolution.py
index acc5ffa..7963590 100644
--- a/example/gluon/super_resolution.py
+++ b/example/gluon/super_resolution.py
@@ -144,7 +144,7 @@ def train(epoch, ctx):
         ctx = [ctx]
     net.initialize(mx.init.Orthogonal(), ctx=ctx)
     # re-initialize conv4's weight to be Orthogonal
-    net.conv4.collect_params().initialize(mx.init.Orthogonal(scale=1), ctx=ctx)
+    net.conv4.collect_params().initialize(mx.init.Orthogonal(scale=1), 
force_reinit=True, ctx=ctx)
     trainer = gluon.Trainer(net.collect_params(), 'adam', {'learning_rate': 
opt.lr})
     loss = gluon.loss.L2Loss()
 

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

Reply via email to