Repository: incubator-singa
Updated Branches:
  refs/heads/master 30e704cbe -> 6bcd5d0e9


SINGA-368 Fix the bug in Cifar10 examples


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/bfd8ce9e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/bfd8ce9e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/bfd8ce9e

Branch: refs/heads/master
Commit: bfd8ce9e160262b96e13e37116105073a3b4f4ff
Parents: 30e704c
Author: Wentong-DST <[email protected]>
Authored: Wed May 16 13:51:39 2018 +0800
Committer: Wentong-DST <[email protected]>
Committed: Wed May 16 13:51:39 2018 +0800

----------------------------------------------------------------------
 examples/cifar10/train.py | 4 ++--
 python/singa/net.py       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/bfd8ce9e/examples/cifar10/train.py
----------------------------------------------------------------------
diff --git a/examples/cifar10/train.py b/examples/cifar10/train.py
index 07d91c7..2a25920 100644
--- a/examples/cifar10/train.py
+++ b/examples/cifar10/train.py
@@ -39,7 +39,7 @@ from singa import tensor
 from singa.proto import core_pb2
 from caffe import caffe_net
 
-import alexnet
+# import alexnet
 import vgg
 import resnet
 
@@ -182,7 +182,7 @@ def train(data, net, max_epoch, get_lr, weight_decay, 
batch_size=100,
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='Train dcnn for cifar10')
     parser.add_argument('model', choices=['vgg', 'alexnet', 'resnet', 'caffe'],
-                        default='alexnet')
+                        default='vgg')
     parser.add_argument('data', default='cifar-10-batches-py')
     parser.add_argument('--use_cpu', action='store_true')
     args = parser.parse_args()

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/bfd8ce9e/python/singa/net.py
----------------------------------------------------------------------
diff --git a/python/singa/net.py b/python/singa/net.py
index fa223b2..dc8e9ce 100644
--- a/python/singa/net.py
+++ b/python/singa/net.py
@@ -182,7 +182,7 @@ class FeedForwardNet(object):
         Please use backprob() instead.
         The back progagation algorithm computes gradients but it does not 
train.
         '''
-        return backprob(x, y)
+        return self.backprob(x, y)
 
     def backprob(self, x, y):
         '''Run BP for one iteration.

Reply via email to