projects
/
agtree2dot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor update.
[agtree2dot.git]
/
agtree2dot.py
diff --git
a/agtree2dot.py
b/agtree2dot.py
index
0f787ac
..
4eef05a
100755
(executable)
--- a/
agtree2dot.py
+++ b/
agtree2dot.py
@@
-83,7
+83,7
@@
def fill_graph_lists(u, node_labels, node_list, link_list):
re.search('<class \'(.*\.|)([a-zA-Z0-9_]*)\'>', str(type(u))).group(2))
node_list[u] = node
re.search('<class \'(.*\.|)([a-zA-Z0-9_]*)\'>', str(type(u))).group(2))
node_list[u] = node
- if
isinstance(u, torch.autograd.Variable
):
+ if
hasattr(u, 'grad_fn'
):
fill_graph_lists(u.grad_fn, node_labels, node_list, link_list)
add_link(node_list, link_list, u, 0, u.grad_fn, 0)
fill_graph_lists(u.grad_fn, node_labels, node_list, link_list)
add_link(node_list, link_list, u, 0, u.grad_fn, 0)