[GitHub] reminisce commented on a change in pull request #10429: [MXNET-210]give warning for variables with same name in graph visualization

2018-04-12 Thread GitBox
reminisce commented on a change in pull request #10429: [MXNET-210]give warning 
for variables with same name in graph visualization
URL: https://github.com/apache/incubator-mxnet/pull/10429#discussion_r181153987
 
 

 ##
 File path: python/mxnet/visualization.py
 ##
 @@ -252,6 +252,15 @@ def plot_network(symbol, title="plot", save_format='pdf', 
shape=None, node_attrs
 shape_dict = dict(zip(interals.list_outputs(), out_shapes))
 conf = json.loads(symbol.tojson())
 nodes = conf["nodes"]
+# check if multiple nodes have the same name
+if len(nodes) != len(set([node["name"] for node in nodes])):
+seen = set()
+seen_add = seen.add
 
 Review comment:
   Why need to define this?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] reminisce commented on a change in pull request #10429: [MXNET-210]give warning for variables with same name in graph visualization

2018-04-12 Thread GitBox
reminisce commented on a change in pull request #10429: [MXNET-210]give warning 
for variables with same name in graph visualization
URL: https://github.com/apache/incubator-mxnet/pull/10429#discussion_r181153891
 
 

 ##
 File path: python/mxnet/visualization.py
 ##
 @@ -252,6 +252,15 @@ def plot_network(symbol, title="plot", save_format='pdf', 
shape=None, node_attrs
 shape_dict = dict(zip(interals.list_outputs(), out_shapes))
 conf = json.loads(symbol.tojson())
 nodes = conf["nodes"]
+# check if multiple nodes have the same name
+if len(nodes) != len(set([node["name"] for node in nodes])):
+seen = set()
 
 Review comment:
   `seen_nodes`


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] reminisce commented on a change in pull request #10429: [MXNET-210]give warning for variables with same name in graph visualization

2018-04-09 Thread GitBox
reminisce commented on a change in pull request #10429: [MXNET-210]give warning 
for variables with same name in graph visualization
URL: https://github.com/apache/incubator-mxnet/pull/10429#discussion_r180208742
 
 

 ##
 File path: python/mxnet/visualization.py
 ##
 @@ -252,6 +252,10 @@ def plot_network(symbol, title="plot", save_format='pdf', 
shape=None, node_attrs
 shape_dict = dict(zip(interals.list_outputs(), out_shapes))
 conf = json.loads(symbol.tojson())
 nodes = conf["nodes"]
+# check if multiple nodes have the same name
+if len(nodes) != len(set([node["name"] for node in nodes])):
+logging.warning("There are multiple variables with the same name in 
your graph, "
 
 Review comment:
   Second this.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services