Theano Graph Structure
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)
- python object references: Arrow.
- Apply node: blue box. is composed of
inputs
,op
andoutput
fields. - Variable Node: Red Box. the
owner
ofx
andy
point toNone
, as they are not the results of another computation. If one of them is the result of another computation, it'sowner
field would point to another Apply Node. - Op Node: Green circle.
- 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)
:
- Op: the function to be applied.
- inputs:the arguments of the functions.
- 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
- type:
- owner: None or
Apply Node
- index
- 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的更多相关文章
- Theano入门笔记1:Theano中的Graph Structure
译自:http://deeplearning.net/software/theano/extending/graphstructures.html#graphstructures 理解Theano计算 ...
- 论文解读(SUBLIME)《Towards Unsupervised Deep Graph Structure Learning》
论文信息 论文标题:Towards Unsupervised Deep Graph Structure Learning论文作者:Yixin Liu, Yu Zheng, Daokun Zhang, ...
- 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 ...
- Theano2.1.18-基础知识之theano的扩展
来自:http://deeplearning.net/software/theano/tutorial/extending_theano.html Extending Theano 该教程覆盖了如何使 ...
- IMPLEMENTING A GRU/LSTM RNN WITH PYTHON AND THEANO - 学习笔记
catalogue . 引言 . LSTM NETWORKS . LSTM 的变体 . GRUs (Gated Recurrent Units) . IMPLEMENTATION GRUs 0. 引言 ...
- 论文笔记之:Semi-supervised Classification with Graph Convolutional Networks
Semi-supervised Classification with Graph Convolutional Networks 2018-01-16 22:33:36 1. 文章主要思想: 2. ...
- 论文笔记之:Graph Attention Networks
Graph Attention Networks 2018-02-06 16:52:49 Abstract: 本文提出一种新颖的 graph attention networks (GATs), 可 ...
- 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 ...
- Emotion Recognition Using Graph Convolutional Networks
Emotion Recognition Using Graph Convolutional Networks 2019-10-22 09:26:56 This blog is from: https: ...
随机推荐
- Gulp自动添加版本号
推荐使用gulp-rev + gulp-rev-collector是比较方便的方法,结果如下: "/css/style.css" => "/dist/css/sty ...
- Android事件分发机制浅谈(三)--源码分析(View篇)
写事件分发源码分析的时候很纠结,网上的许多博文都是先分析的View,后分析ViewGroup.因为我一开始理解的时候是按我的流程图往下走的,感觉方向很对,单是具体分析的时候总是磕磕绊绊的,老要跳到Vi ...
- 使用gulp解决外部编辑器修改Eclipse文件延迟更新的问题
本人前端用惯了Hbuilder,修改了eclipse项目中的文件后,由于是外部编辑器修改过的,eclipse不会自动部署更新,一般按F5刷新项目,或者在 preferences > genera ...
- [Erlang 0109] From Elixir to Erlang Code
Elixir代码最终编译成为erlang代码,这个过程是怎样的?本文通过一个小测试做下探索. 编译一旦完成,你就看到了真相 Elixir代码组织方式一方面和Erlang一样才用非常 ...
- lucky 的 时光助理(2)
lucky小姐说:昨天晚上他喝醉了,发消息说他想我了,说他后悔了. 我很惊讶. 我问lucky:你们很久都没有联系, 突然说... 你怎么想. 没错,'他'就是lucky的前男友. lucky看着我, ...
- SQL Server 自动化运维系列
本系列为SQL SERVER自动化运维的一些操作技巧点,所有内容都是根据日常运维过程中最经常遇到的问题,并为此形成了一些自动化运维的方式,皆为原创.... 供部分DBA和开发人员浏览借鉴,所应用平台基 ...
- 实例:对2个Makefile的备注
实例1:Makefile编译链接简单.c函数 example.c Makefile exe: example.c gcc example.c -o exe clean: rm exe 执行效果: 实例 ...
- 【repost】JavaScript完美运动框架的进阶之旅
运动框架的实现思路 运动,其实就是在一段时间内改变left.right.width.height.opactiy的值,到达目的地之后停止. 现在按照以下步骤来进行我们的运动框架的封装: 匀速运动. 缓 ...
- 简单轮播js实现
<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8" ...
- 搭建一套自己实用的.net架构(3)【ORM-Dapper+DapperExtensions】
现在成熟的ORM比比皆是,这里只介绍Dapper的使用(最起码我在使用它,已经运用到项目中,小伙伴们反馈还可以). 优点: 1.开源.轻量.小巧.上手容易. 2.支持的数据库还蛮多的, Mysql,S ...