fixes in the plotting and in the dot graphing

This commit is contained in:
James Hensman 2014-02-26 17:13:47 +00:00
parent 0e5a453358
commit 68f0af4deb
4 changed files with 21 additions and 13 deletions

View file

@ -77,7 +77,11 @@ class Parameterized(Parameterizable, Pickleable, Gradcheckable):
G.add_edge(pydot.Edge(node, child_node))
for o in self._observer_callables_.keys():
print id(o), self.hirarchy_name()
label = o.name if hasattr(o, 'name') else str(o)
observed_node = pydot.Node(id(o), label=label)
G.add_node(observed_node)
edge = pydot.Edge(str(id(self)), str(id(o)), color='darkorange2', arrowhead='vee')
G.add_edge(edge)
if iamroot:
return G