You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2018/01/20 00:36:26 UTC
[incubator-mxnet] branch master updated: fix hidden node for batch
norm in gluon api[visualization.py] (#9487)
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 23b5657 fix hidden node for batch norm in gluon api[visualization.py] (#9487)
23b5657 is described below
commit 23b5657a0c0852d186b1e387ecb23f448afa67e6
Author: Wei Wu <to...@users.noreply.github.com>
AuthorDate: Sat Jan 20 08:36:18 2018 +0800
fix hidden node for batch norm in gluon api[visualization.py] (#9487)
* fix hidden node for batch norm in gluon api
* fix lint
* more concise
---
python/mxnet/visualization.py | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/python/mxnet/visualization.py b/python/mxnet/visualization.py
index 8c4cc3b..64ac77e 100644
--- a/python/mxnet/visualization.py
+++ b/python/mxnet/visualization.py
@@ -261,14 +261,9 @@ def plot_network(symbol, title="plot", save_format='pdf', shape=None, node_attrs
def looks_like_weight(name):
"""Internal helper to figure out if node should be hidden with `hide_weights`.
"""
- if name.endswith("_weight"):
- return True
- if name.endswith("_bias"):
- return True
- if name.endswith("_beta") or name.endswith("_gamma") or \
- name.endswith("_moving_var") or name.endswith("_moving_mean"):
- return True
- return False
+ weight_like = ('_weight', '_bias', '_beta', '_gamma',
+ '_moving_var', '_moving_mean', '_running_var', '_running_mean')
+ return name.endswith(weight_like)
# make nodes
hidden_nodes = set()
--
To stop receiving notification emails like this one, please contact
['"commits@mxnet.apache.org" <co...@mxnet.apache.org>'].