Theano printing

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.pydotprint(f, outfile="symbolic_graph_opt.png", var_with_name_simple=True)
The output file is available at symbolic_graph_opt.png

Theano printing的更多相关文章

  1. Theano2.1.5-基础知识之打印出theano的图

    来自:http://deeplearning.net/software/theano/tutorial/printing_drawing.html Printing/Drawing Theano gr ...

  2. Theano2.1.15-基础知识之theano如何处理shapre信息

    来自:http://deeplearning.net/software/theano/tutorial/shape_info.html How Shape Information is Handled ...

  3. Theano笔记

    scan函数 theano.scan(fn, sequences=None, outputs_info=None,non_sequences=None, n_steps=None, truncate_ ...

  4. Theano2.1.4-基础知识之图结构

    来自:http://deeplearning.net/software/theano/tutorial/symbolic_graphs.html Graph Structures Theano是将符号 ...

  5. Theano2.1.16-基础知识之调试:常见的问题解答

    来自:http://deeplearning.net/software/theano/tutorial/shape_info.html Debugging Theano: FAQ and Troubl ...

  6. Theano2.1.18-基础知识之theano的扩展

    来自:http://deeplearning.net/software/theano/tutorial/extending_theano.html Extending Theano 该教程覆盖了如何使 ...

  7. Deconvolution Using Theano

    Transposed Convolution, 也叫Fractional Strided Convolution, 或者流行的(错误)称谓: 反卷积, Deconvolution. 定义请参考tuto ...

  8. Theano Graph Structure

    Graph Structure Graph Definition theano's symbolic mathematical computation, which is composed of: A ...

  9. Theano Inplace

    Theano Inplace inplace Computation computation that destroy their inputs as a side-effect. Example i ...

随机推荐

  1. ES6之解构赋值

    截止到ES6,共有6种声明变量的方法,分别是var .function以及新增的let.const.import和class: 我们通常的赋值方法是: var foo='foo'; function ...

  2. JDBC数据库访问操作的动态监测 之 Log4JDBC

    log4jdbc是一个JDBC驱动器,能够记录SQL日志和SQL执行时间等信息.log4jdbc使用SLF4J(Simple Logging Facade)作为日志系统. 特性: 1.支持JDBC3和 ...

  3. 函数式Android编程(II):Kotlin语言的集合操作

    原文标题:Functional Android (II): Collection operations in Kotlin 原文链接:http://antonioleiva.com/collectio ...

  4. iOS中的一些细节

    1. 在使用单例模式时一般使用allocWithZone 因为alloc最终还是会调用allocWithZone进行分配空间 2. synchronized 线程锁(互斥锁) 优点:能防止多线程抢夺资 ...

  5. JavaSE 之 final 初探

    我们先看一道面试题: 请问 final 的含义是什么?可以用在哪里?其初始化的方式有哪些? 首先我们回答一下这道题,然后再探究其所以然.  1.final 表示“最终的”.“不可改变的”,意指其修饰类 ...

  6. java实现敏感词过滤(DFA算法)

    小Alan在最近的开发中遇到了敏感词过滤,便去网上查阅了很多敏感词过滤的资料,在这里也和大家分享一下自己的理解. 敏感词过滤应该是不用给大家过多的解释吧?讲白了就是你在项目中输入某些字(比如输入xxo ...

  7. jQuery 上传头像插件Jcrop的实例

    兼容:ie6+,FF,chrome等 示例图: CSS:     说明:图像比例为110:135     下载包里有 jquery.Jcrop.css          .jc-demo-box{po ...

  8. Linux查看物理CPU个数、核数、逻辑CPU个数

    # 总核数 = 物理CPU个数 X 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数 # 查看物理CPU个数 cat /proc/cpuinfo| ...

  9. Selenium-java-Log4j环境搭建和

    1 导入Log4j ,我这版本是1.2.17  自己选择版本  **别告诉我不会导入 2  Path  奶瓶 3 创建一个与src同目录文件 命名为 log4.properties 4 文件的内容是, ...

  10. xml解析

    config.xml <?xml version="1.0" encoding="UTF-8"?> <prize> <gift&g ...