Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
a908120e
提交
a908120e
authored
3月 11, 2009
作者:
Joseph Turian
浏览文件
操作
浏览文件
下载
差异文件
merge
上级
b91f5e63
808184f5
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
56 行增加
和
46 行删除
+56
-46
sandbox.txt
doc/doc/sandbox.txt
+6
-0
index.txt
doc/index.txt
+50
-46
没有找到文件。
doc/doc/sandbox.txt
浏览文件 @
a908120e
...
@@ -193,3 +193,9 @@ How to reuse (overwrite) a storage tensor
...
@@ -193,3 +193,9 @@ How to reuse (overwrite) a storage tensor
``theano.compile.io.Out(gw1, borrow = True)`` for that value in
``theano.compile.io.Out(gw1, borrow = True)`` for that value in
``compile.function``
``compile.function``
=========================================
ProfileMode
=========================================
*** write up how to use it ***
doc/index.txt
浏览文件 @
a908120e
...
@@ -5,43 +5,49 @@
...
@@ -5,43 +5,49 @@
Theano
Theano
======
======
Theano is a Python library aiming to allow definition, optimization
Theano is a Python library that allows you to definite, optimize, and
and efficient evaluation of mathematical expressions involving
efficiently evaluate mathematical expressions involving multi-dimensional
multi-dimensional arrays (though it may be extended to support many
arrays. It can be extended to support other types. Theano melds some
other types). Theano melds some aspects of a computer algebra system
aspects of a computer algebra system (CAS) with aspects of an optimizing
(CAS) with aspects of an optimizing compiler. This is particularly
compiler. It can even transform some or all of the expression into C code
useful in fields such as machine learning where complicated algorithms
and compile it into native machine instructions. This combination of CAS
must be run over large amounts of data.
with optimizing compilation is particularly useful for computational
fields in which complicated mathematical expressions are evaluated
Theano supports a wide range of numerical types in multiple
numerous times over large data sets.
dimensions, a rapidly growing number of well-tested operations as well
as utilities to compute the gradient of an expression with respect to
Theano was written at the LISA_ lab to support the development of
another. Symbolic expressions may be compiled into functions, which
work merrily on the same data structures as numpy_, allowing for easy
interoperability.
Theano's compiler applies many optimizations of varying
complexity. These optimizations include, but are not limited to
constant folding, merging of similar subgraphs (to avoid calculating
the same values more than once), simple arithmetic simplification
(``x*y/x -> y``), inserting efficient BLAS_ operations and using
inplace operations wherever it is safe to do so. Theano also defines
several optimizations which improve the numerical stability of
computations and it provides a framework to add and test new
optimizers.
Theano was written at the LISA_ to support the development of
efficient machine learning algorithms while minimizing human
efficient machine learning algorithms while minimizing human
time. Theano was named after the `Greek mathematician`_ who may have
time. We use it especially in gradient-based learning techniques.
been Pythagoras' wife.
Theano supports a range of numerical types in multiple dimensions and
a number of well-tested operations. It also allows you to compute the
gradient of an expression with respect to another. Symbolic expressions
may be compiled into functions, which work on the same data structures
as numpy_, allowing for easy interoperability.
Theano's compiler applies many optimizations of varying complexity
to these symbolic expressions. These optimizations include, but are
not limited to:
* constant folding
* merging of similar subgraphs, to avoid calculating the same values more than once
* simple arithmetic simplification (``x*y/x -> y``)
* inserting efficient BLAS_ operations
* using inplace operations wherever it is safe to do so.
Theano defines several optimizations which improve the numerical
stability of computations. It also provides a framework to add and test
new optimizers.
Theano was named after the `Greek mathematician`_, who may have
been Pythagoras' wife.
Theano is released under a BSD license (:ref:`link <license>`)
Theano is released under a BSD license (:ref:`link <license>`)
Sneak peek
Sneak peek
==========
==========
Here
's a very simple example of how to use Theano.
It doesn't show
Here
is a simple example of how to use Theano.
It doesn't show
off many of Theano's features, but it illustrates concretely what
off many of Theano's features, but it illustrates concretely what
Theano is.
Theano is.
...
@@ -66,9 +72,8 @@ Theano is.
...
@@ -66,9 +72,8 @@ Theano is.
Theano is not a programming language in the normal sense because you
Theano is not a programming language in the normal sense because you
write a program in Python that builds expressions for Theano. Still
write a program in Python that builds expressions for Theano. Still
it is like a programming language in the sense that to use theano, you
it is like a programming language in the sense that you have to
have to
- declare variables (``a,b``) and give their types
- declare variables (``a,b``) and give their types
...
@@ -77,8 +82,8 @@ have to
...
@@ -77,8 +82,8 @@ have to
- compile expression graphs to functions in order to use them for computation.
- compile expression graphs to functions in order to use them for computation.
It is good to think of ``theano.function`` as the interface to a
It is good to think of ``theano.function`` as the interface to a
compiler which builds a callable object from a purely symbolic graph
;
compiler which builds a callable object from a purely symbolic graph
.
o
ne of theano's most important features is that ``theano.function``
O
ne of theano's most important features is that ``theano.function``
can optimize a graph and even compile some or all of it into native
can optimize a graph and even compile some or all of it into native
machine instructions.
machine instructions.
...
@@ -95,18 +100,18 @@ package, so what does Theano do that Python and numpy do not?
...
@@ -95,18 +100,18 @@ package, so what does Theano do that Python and numpy do not?
parts your expression graph into native machine code, which runs
parts your expression graph into native machine code, which runs
much faster than python.
much faster than python.
- *symbolic differentiation*: Theano can
convert a symbolic graph
- *symbolic differentiation*: Theano can
automatic build symbolic graphs
build symbolic graphs
for computing gradients.
for computing gradients.
- *stability optimizations*: Theano can recognize numerically unstable
- *stability optimizations*: Theano can recognize numerically unstable
expressions and compute them with more stable algorithms.
expressions and compute them with more stable algorithms.
There
also exists symbolic packages
in Python, namely sympy_. Theano
There
exist another symbolic package
in Python, namely sympy_. Theano
is different from
them in the sense that while it
allows symbolic
is different from
sympy in the sense that while Theano
allows symbolic
manipulation it puts more emphasis on the evaluation of these
manipulation it puts more emphasis on the evaluation of these
expressions
expressions and being able to repeatedly evaluate them on many
and being able to repeatedly evaluate them on many different inputs. Theano
different sets of inputs. It is also better suited to handling very
is also better suited to handling very large tensors which have no
large tensors which have no
assumed structures.
assumed structures.
If numpy_ is to be compared to MATLAB_ and sympy_ to Mathematica_,
If numpy_ is to be compared to MATLAB_ and sympy_ to Mathematica_,
Theano is a sort of hybrid of the two which tries to make the best of
Theano is a sort of hybrid of the two which tries to make the best of
...
@@ -145,10 +150,9 @@ issues that concern the end users.
...
@@ -145,10 +150,9 @@ issues that concern the end users.
Questions, comments, praise, criticism as well as bug reports should
Questions, comments, praise, criticism as well as bug reports should
be submitted to these mailing lists.
be submitted to these mailing lists.
We welcome all kinds of contributions. Our `task list`_ is full of
We welcome all kinds of contributions. If you have any questions
interesting ideas awaiting a champion. If you have any questions
regarding how to extend Theano, please feel free to ask on the theano-dev_
regarding how to extend Theano, please feel free to ask on the
mailing list.
theano-dev_ mailing list.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论