GSoC: Endgame


It’s already the end of GSoC2015! I used the remaining two weeks to wrap up my project. Specifically,

  • I made some further layout improvements and fixed remaining bugs,
  • I tested the visualizing in different browsers and wrote test cases,
  • I made sure that all interfaces are documented, and
  • I wrote a user guide.

Finally, I submitted a pull request, which will hopefully be merged soon into Theano’s master branch! Then it will be your job to test the new d3viz module for interactive visualizing of Theano graphs, and to let me know about issues and features requests!












GSoC: Week eight and nine

Theano OpFromGraph ops allow to define new operations that can be called with different inputs at different places in the compute graph. I extended my implementation to compactly visualize OpFromGraph ops: By default, an OpFromGraph op is represented as a single node. Clicking on it will reveal its internal graph structure. Have a look at this example!

OpFromGraph ops may be composed of further OpFromGraph nodes, which will be visualized as nested graphs as you can see in this example.
In the last stage of GSoC 2015, I will improve how nodes are arranged in the visualization, shorten node labels, and show more detailed information about nodes such as their definition in the source code!

GSoC: Week six and seven

Theano allows function profiling by setting the profile=True flag. After at least one function call, the compute time of each node can be then be printed with debugprint. However, analyzing complex graphs in this way can become cumbersome.

d3printing allows now to graphically visualize the same timing information and hence to easily spot bottlenecks in Theano graphs! If the function has been profiled, a ‘Toggle profile colors’ button will appear on the top on the page. By clicking on it, nodes will be colored by their compute time. In addition, timing information can be retrieved by mouse-over event! You can find an example here, and the source code here.


The second new feature is a context menu to edit the label of nodes and to release them from a fixed position.






The next release will make it possible to visualize complicated nested graphs with OpFromGraph nodes. Stay tuned!

GSoC: Week four and five

Theano graphs become editable! By clicking on nodes, it is now possible to change their label. This allows to shorten default labels or to extend them by additional information. Moving the cursor over nodes will now also highlight all  incoming and outgoing edges . You can find three examples here.

150705_editI started to work on curved edges that minimize intersections with nodes, but everything is still in development:

150705_curvedApart from that, I fixed a couple of bugs and revised the backend to visualizing more detailed graph information in the future, such as timing information or nested graphs.

I welcome any feedback and ideas to further improve the visualization!

GSoC week three

Further steps towards a more agile visu150614_complexalization…

Last week, I revised my implementation to improve the visualization of complex graphs with many nodes. Specifically, I

  • added buttons to rearrange all nodes in a force layout,
  • implemented double-click events to release single nodes from a fixed position,
  • colored edges consistently with pydotprint.

You can play around with three different examples here!

GSoC week one

In the first of GSoC week, I a) learned more about javascript and the d3.js library, b) initialized my Theano repository, and c) started to implement the module d3printing, which provides the function d3print to convert a statistic Theano graph such as






into a dynamic graph:






Nodes are arranged in a force layout, and it is possible to pan and zoom, to drag and drop nodes, and to highlight edge information via mouse-over events.

The visualization is far from perfect! Next week, I will

  • revise the layout to arrange nodes,
  • use the same colors and shapes for nodes as pydotprint,
  • revise the visualization of edges,
  • improve mouse-over events, and
  • use the full page width and height to visualize the graph.

Let’s go!

Welcome to GSoC2015!

gsoc2015I am very proud to announce that my Google Summer of Code (GSoC) proposal ‘Theano: Interactive visualization of Computational Graphs’ was successful, which gives me the chance to enhance Theano’s visualization features this summer!

Theano is a popular library for defining and automatically differentiating mathematical expression. It is widely used to implement complex machine learning models such as deep neural networks, which are compiled into a graph structure with interconnected nodes. Currently, Theano only supports static text and image output, which makes it hard to debug and analyze complex models such as a deep neural network with many layers. During Google Summer of Code, I will extend Theano by a module to interactively visualize and analyze complex computation graphs. The module will be based on the d3.j3 javascript library and allow to generate HTMLs documents, which can be opened in any web browser. It will allow to dynamically a) arrange, collapse and expand, as well to edit nodes, b) panning and zooming to different regions, and c) highlighting additional information via mouseover events. An additional goal is implementing an IPython %magic to directly visualize graphs in an IPython notebook!

GSoC2015 will take place between 25 May and 31 August, and will contain a mid-term and end-term evaluation. I will be mentored by Frédéric Bastien, and regularly post about my progress.

Looking forward to a great Summer!