Repository: incubator-singa Updated Branches: refs/heads/master 3d688be4e -> e1b39756a
SINGA-411 Local variable 'params' referenced before assignment Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/e1b39756 Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/e1b39756 Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/e1b39756 Branch: refs/heads/master Commit: e1b39756af5ac3831f86b0aec53033630484f027 Parents: 3d688be Author: jixin <[email protected]> Authored: Tue Nov 27 23:50:48 2018 +0800 Committer: jixin <[email protected]> Committed: Wed Nov 28 10:23:21 2018 +0800 ---------------------------------------------------------------------- python/singa/net.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/e1b39756/python/singa/net.py ---------------------------------------------------------------------- diff --git a/python/singa/net.py b/python/singa/net.py index 12b0ead..e92d560 100755 --- a/python/singa/net.py +++ b/python/singa/net.py @@ -472,7 +472,7 @@ class FeedForwardNet(object): f = f[0:-4] sp = snapshot.Snapshot(f, True, buffer_size) v = tensor.from_numpy(np.array([__version__])) - params['SINGA_VERSION'] = v + sp.write('SINGA_VERSION', v) for (name, val) in zip(self.param_names(), self.param_values()): val.to_host() sp.write(name, val)
