To visualize the internal relation graph of theano variables.

Installing

  1. conda install pydot graphviz

  2. add graphviz path D:\Anaconda\Library\bin\graphvizto system PATH[windows version]

or:

  1. download installer from http://www.graphviz.org/Download_windows.php.
  2. conda install pydot graphviz
  3. add graphviz bin path C:\Program Files (x86)\Graphviz2.38\bin to system PATH[windows version]

Application

>>> import theano
>>> import theano.tensor as T
>>> x=T.matrix('x')
>>> y=T.matrix('y')
>>> z=x**2+y**3
>>> f=theano.function([x,y],z)
>>> theano.printing.pydotprint(z, outfile="symbolic_graph_unopt.png", var_with_name_simple=True)
The output file is available at symbolic_graph_unopt.png

Theano printing

>>> theano.printing.pydotprint(f, outfile="symbolic_graph_opt.png", var_with_name_simple=True)
The output file is available at symbolic_graph_opt.png

Theano printing

相关文章:

  • 2021-12-16
  • 2022-01-16
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2022-02-25
  • 2021-11-03
猜你喜欢
  • 2021-08-26
  • 2021-04-24
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2022-01-05
  • 2021-10-09
相关资源
相似解决方案