Skip to content

Conversation

dmadisetti
Copy link

A common endpoint for viewing graphs in notebooks was: http://tensorboard.appspot.com/tf-graph-basic.build.html

Note that this link is now dead! I'm not sure whether this code was modified from appspot app or visa versa, but it it the only living copy of tf-graph-basic.build.html I can find. As of recent chrome updates <link rel=X> for importing HTML does not work, as such we move the polymer definitions into the file and pass the data as a base64 encoded location.hash. This method also allows for hosting the static page off server (work around for coors).

Note that GET requests are limited in size, thus super large graphs will NOT be visible. However, this was more a "trying to figure out what's wrong" rather than a "let's come up with a permanent fix", and meets my purposes.

NOTE: Tensorflow 2 exposes a tensorboard magic that lets you encode an entire tensorboard into a notebook. However this is way better imo (less cluttered, doesn't require a server).

strip_def = strip_consts(graph_def, max_const_size=max_const_size)
data = b64encode(str(strip_def).encode()).decode()
id = str(np.random.rand())
page = "https://raw.githack.com/AnotherGroupChat/Machine-Learning/dmadisetti-patch-1/tf-graph/tf-graph-basic.build.html"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops. Obviously will change this, but looks like this project is stale anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant