Skip to content

Commit

Permalink
一部のパラメータのみに名前をつけられるように変更
Browse files Browse the repository at this point in the history
  • Loading branch information
juri200405 committed Dec 22, 2020
1 parent 46add7f commit be8b7dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchviz/dot.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def add_nodes(var):
dot.node(str(id(var)), size_to_str(var.size()), fillcolor='orange')
elif hasattr(var, 'variable'):
u = var.variable
name = param_map[id(u)] if params is not None else ''
name = param_map.get(id(u), ' ') if params is not None else ''
node_name = '%s\n %s' % (name, size_to_str(u.size()))
dot.node(str(id(var)), node_name, fillcolor='lightblue')
elif var in output_nodes:
Expand Down

0 comments on commit be8b7dd

Please sign in to comment.