From 75c4f522cda71ef830148ec8d881157322be9502 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Wed, 23 Aug 2017 16:24:37 +0200 Subject: [PATCH] Minor update. --- agtree2dot.py | 2 +- mlp.pdf | Bin 16963 -> 16969 bytes 2 files changed, 1 insertion(+), 1 deletion(-) 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 a950b22de8734bb9d2664dc6c2a74faf97c99a6d..ee3ebb37214041d50d114ab4201fef1f2896a2ba 100644 GIT binary patch delta 2180 zcmZXRc{J1w7ss1~2#-jTrNK}#%woovFt&_p#DlC&b_pR{n92OIhU{Z0qOvr$P@<3} z`x1lfj3$&qW6Rj$dEU44p7Wkl_pk5$-245Wd(Lf%0Ch!xl8gXC;t*c2Vb}79557CI zte7IDBBZPPN!v<+`xSSy3Y>5dGP6vR@=UC6uaruCGHkOqKFr7|FK#Gi(^y5jLngjF zZ;x2*el2qpV6A&>X6=rJQXA>sjBwHE`n@&J7EJcC$AQi+C2oz;#gFBQK?UX6fr-Jx zn~Zhw>Q$C`2hgMGljQs^Ny82lUdMaU0_U%qA&Mmi3X+yJqn>OU9rjJ{l4j3^C^O5v z>$ttkeu{|KEMgez3_6*w&XWAYHpDJnOQT>U+p;CS5Ub9^8`0rn`>vSEJ<2Z0y^{rc)MU;NaY z9Xk$xkmSEs?Q|CD8e%NLo;rcUs+-z{(^;{~Jjp_mZDSc}2WqBeGdr}pKW7uwkhu)9 zg3hW=^Xzn|wmU_r@8*)zDUf(>Cdp9tYz?fYHp2{m+Jm$5unX}rrIDGp;}=BoU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