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. 清空Fragment回退栈中某个Fragment

    出栈的方法:getActivity().getSupportFragmentManager().popBackStackImmediate(CreateOneFragment.class.getNam ...

  2. IT软件技术人员的职位路线(从程序员到技术总监) - 部门管理经验谈

    以前写过一个文(IT从业者的职业道路(从程序员到部门经理) - 项目管理系列文章),主要介绍笔者的职业发展之路,不过该文需要后续了,因为笔者现在从事的是“产品经理”一职.从笔者的导航文([置顶]博文快 ...

  3. BigCouch资料整理

    BigCouch架构 CHTTPD 封装了FABIC接口,CouchDB在HTTP层的集群操作 FABRIC  CouchDB集群的操作代理. 主要用于控制CouchDB集群,Erlang层面的操作 ...

  4. python ldap

    # -*- coding: UTF-8 -*- import ldap, ConfigParser, os from ldap import modlist LDAP_HOST = "myd ...

  5. git submodule初用

    git submodule主要是用于针对git项目中还存在git子模块的情况.在一般情况下,我们通过git clone 获取项目的时候会把项目中的所有信息都拿到.但是,如果相关中存在git子模块那么, ...

  6. Maven :No goals have been specified for this build

    Maven报错 报错信息如下:No goals have been specified for this build 解决办法:在<build></build>标签中增加  & ...

  7. [LeetCode] Data Stream as Disjoint Intervals 分离区间的数据流

    Given a data stream input of non-negative integers a1, a2, ..., an, ..., summarize the numbers seen ...

  8. [LeetCode] Rank Scores 分数排行

    Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ra ...

  9. [LeetCode] Word Ladder II 词语阶梯之二

    Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from ...

  10. .NET跨平台之旅:将示例站点从 ASP.NET 5 RC1 升级至 ASP.NET Core 1.0

    终于将“.NET跨平台之旅”的示例站点 about.cnblogs.com 从 ASP.NET 5 RC1 升级至 ASP.NET Core 1.0 ,经历了不少周折,在这篇博文中记录一下. 从 AS ...