From: Francois Fleuret Date: Wed, 23 Aug 2017 14:24:37 +0000 (+0200) Subject: Minor update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=75c4f522cda71ef830148ec8d881157322be9502;p=agtree2dot.git Minor update. --- diff --git a/agtree2dot.py b/agtree2dot.py index 0f787ac..4eef05a 100755 --- a/agtree2dot.py +++ b/agtree2dot.py @@ -83,7 +83,7 @@ def fill_graph_lists(u, node_labels, node_list, link_list): re.search('', 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) diff --git a/mlp.pdf b/mlp.pdf index a950b22..ee3ebb3 100644 Binary files a/mlp.pdf and b/mlp.pdf differ