Graph Structure

Graph Definition

theano's symbolic mathematical computation, which is composed of:

  • Apply node: the application of an operator to some variable.
  • Variable node: symbolic varibles.
  • Op node: mathematical operation like: +,-,*,\,sqrt,sum,tanh.
  • Types: describe data type.

Example

Code

>>> import theano.tensor as T

>>> x = T.matrix('x')
>>> y = T.matrix('y')
>>> z = x + y
>>> print z.owner
Elemwise{add,no_inplace}(Elemwise{pow,no_inplace}.0, y)

  1. python object references: Arrow.
  2. Apply node: blue box. is composed of inputs,op and output fields.
  3. Variable Node: Red Box. the owner of x and y point to None, as they are not the results of another computation. If one of them is the result of another computation, it's owner field would point to another Apply Node.
  4. Op Node: Green circle.
  5. Types: Purple boxes.

Note: Apply Node points to z, so z.owner points back to the Apply instance.

Graph Structures

Apply

internal node represent of computation graph in theano, which can be accessed by variable_name.owner.

the Apply Node has three fields, and can be created by gof.Apply(op,inputs,outputs):

  1. Op: the function to be applied.
  2. inputs:the arguments of the functions.
  3. outputs: the return value of the function.

Op

certain computation on some inputs and producing some types of outputs.

Type

it helps to tailor C code to handle and optimize the computation graph.

Variable

  1. type:
  2. owner: None or Apply Node
  3. index
  4. name: string for debugging

Constant

a constant is a variable. it assume the Op Node will not modify the inputs.

Graph Structures Extension

Theano Graph Structure的更多相关文章

  1. Theano入门笔记1:Theano中的Graph Structure

    译自:http://deeplearning.net/software/theano/extending/graphstructures.html#graphstructures 理解Theano计算 ...

  2. 论文解读(SUBLIME)《Towards Unsupervised Deep Graph Structure Learning》

    论文信息 论文标题:Towards Unsupervised Deep Graph Structure Learning论文作者:Yixin Liu, Yu Zheng, Daokun Zhang, ...

  3. infoq - neo4j graph db

    My name is Charles Humble and I am here at QCon New York 2014 with Ian Robinson. Ian, can you introd ...

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

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

  5. IMPLEMENTING A GRU/LSTM RNN WITH PYTHON AND THEANO - 学习笔记

    catalogue . 引言 . LSTM NETWORKS . LSTM 的变体 . GRUs (Gated Recurrent Units) . IMPLEMENTATION GRUs 0. 引言 ...

  6. 论文笔记之:Semi-supervised Classification with Graph Convolutional Networks

    Semi-supervised Classification with Graph Convolutional Networks 2018-01-16  22:33:36 1. 文章主要思想: 2. ...

  7. 论文笔记之:Graph Attention Networks

    Graph Attention Networks 2018-02-06  16:52:49 Abstract: 本文提出一种新颖的 graph attention networks (GATs), 可 ...

  8. Visualizing MNIST with t-SNE, MDS, Sammon’s Mapping and Nearest neighbor graph

    MNIST 可视化 Visualizing MNIST: An Exploration of Dimensionality Reduction At some fundamental level, n ...

  9. Emotion Recognition Using Graph Convolutional Networks

    Emotion Recognition Using Graph Convolutional Networks 2019-10-22 09:26:56 This blog is from: https: ...

随机推荐

  1. ViewPager轮播图

    LoopViewPagerLayout无限轮播 项目地址:https://github.com/why168/LoopViewPagerLayout 支持三种动画: 支持修改轮播的速度: 支持修改滑动 ...

  2. c++宏定义命令

    在程序开始以#开头的命令,他们是预编译命令.有三类预编译命令:宏定义命令.文件包含命令.条件编译命令:今天聊聊宏定义: 宏定义命令将一个标识符定义为一个字符串,源程序中的该标识符均以指定的字符串来代替 ...

  3. iOS sqlite 的各种操作

    iOS --SQL的增加.删除.查找.修改 iOS对于数据库的操作:增加.删除.查找.修改 首先需要创建一个数据库:本程序的数据库是在火狐浏览器里的插件里写的微量型数据库 火狐找查找SQLite Ma ...

  4. Android—IMEI

    TelephonyManager telephonyManager= (TelephonyManager) getSystemService(TELEPHONY_SERVICE); // Return ...

  5. Appfuse:添加自定义页面组件

    我之前是做ASP.NET的,碰到被多个页面都使用的类似组件后,就想着采用ascx(用户自定义组件)来解决,那做Java我也想用这种方案. 我要做的效果如下: 实现方案:tag方式(自定义标签) 1. ...

  6. 5、项目间的沟通协调 - PMO项目管理办公室

    沟通是人类所具备的优良而有一定技巧的一种方式.但是,沟通也是PMO项目管理办公室中所有项目组必须建立起来的能力,也是PMO项目管理办公室日常所需要进行的一项工作内容. 一.项目间的沟通: PMO项目管 ...

  7. 3Sum algorithm - 非常容易理解的实现 (java)

    原题重述:(点击图片可以进入来源链接) 这到题目的中文解释是, 输入一个数组,例如{-1 0 1 2 -1 -4},从数组中找三个数(a,b,c),使得其和0,输出所有的(a,b,c)组合. 要求ab ...

  8. Scala初入

    何为Scala物 Scala为基于JVM虚拟机中的面向对象与函数式编程思想并且完全兼容Java的混合编程语言,可以是Scala与Java是同根同源的,既然Scala与JAVA都是基于JVM之上的编程语 ...

  9. QWhatsThis的用法

    QWhatsThis,为任何widget提供简单的描述,回答"What's This?"这个问题. 示例:(在MainWindow下运行) 定义全局变量 QAction *newA ...

  10. java基础学习02(简单的java程序)

    简单的java程序 一.完成的目标 1. 理解java程序的基本组成 2. 如何对程序代码进行注释 3. java标识符的命名规则 4. 了解java中的关键字 5. 使用java定义变量或声明变量 ...