google-deepmind / dnc

A TensorFlow implementation of the Differentiable Neural Computer.
Apache License 2.0
2.5k stars 443 forks source link

Tensorboard graph visualization #31

Closed olegkolner closed 6 years ago

olegkolner commented 6 years ago

Hi guys,

I am really excited about DNC and trying to understand its implemantation. In particular, I want to visualize the DNC's computational graph in Tensorboard. Unfortunately, the default graph shows not all nodes, e.g. I can not find nodes from addressing module ("Freeness" and "CosineWeights"). I am not a tensorflow and sonnet expert, but as I understand the documentation, all nodes defined in _build method must be added to the default graph, right?

So how can I get the full visualized graph? Thanks a lot!

dm-jrae commented 6 years ago

The name passed to the sonnet module constructor will specify the scope name for the ops defined in _build. The scope names should be 'freeness' and 'cosine_weights'. Sometimes you have to collapse ('-') smaller sub-scopes of nodes to more clearly see a larger group of ops, or even expand ('+') a super-scope to see its sub-scopes.

olegkolner commented 6 years ago

Thank you for the answer! Unfortunately collapsing and expanding do not help in this case. As far as I know, the scope names 'freeness' and 'cosine_weights' have to appear in the 'memory_access' scope name. But I can not find any (through collapsing and expanding as well). Here is the screen-shot of the graph: screenshot

Any ideas?

dm-jrae commented 6 years ago

I am going to close this for now as general tensorflow visualization is beyond the scope of this library.