Simple way to visualize a TensorFlow graph in Jupyter?

Here’s a recipe I copied from one of Alex Mordvintsev deep dream notebook at some point from IPython.display import clear_output, Image, display, HTML import numpy as np def strip_consts(graph_def, max_const_size=32): “””Strip large constant values from graph_def.””” strip_def = tf.GraphDef() for n0 in graph_def.node: n = strip_def.node.add() n.MergeFrom(n0) if n.op == ‘Const’: tensor = n.attr[‘value’].tensor size … Read more

Network chord diagram woes in R

I made a bunch of changes to edgebundleR. These are now in the main repo. The following code should get you close to the desired result. live example # devtools::install_github(“garthtarr/edgebundleR”) library(edgebundleR) library(igraph) library(data.table) d <- structure(list(ID = c(“KP1009”, “GP3040”, “KP1757”, “GP2243”, “KP682”, “KP1789”, “KP1933”, “KP1662”, “KP1718”, “GP3339”, “GP4007”, “GP3398”, “GP6720”, “KP808”, “KP1154”, “KP748”, “GP4263”, “GP1132”, … Read more