Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
aaab6ea5
提交
aaab6ea5
authored
1月 14, 2015
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update Theano section
上级
a085da4c
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
8 行增加
和
11 行删除
+8
-11
presentation.tex
doc/nextml2015/presentation.tex
+8
-11
没有找到文件。
doc/nextml2015/presentation.tex
浏览文件 @
aaab6ea5
...
@@ -480,8 +480,7 @@ array(3.0)
...
@@ -480,8 +480,7 @@ array(3.0)
\item
Use theano.compat.python2x.OrderedDict
\item
Use theano.compat.python2x.OrderedDict
\item
Not collections.OrderedDict
\item
Not collections.OrderedDict
\begin{itemize}
\begin{itemize}
\item
This isn’t available in older versions of python,
\item
This isn’t available in older versions of python
and will limit the portability of your code
\end{itemize}
\end{itemize}
\item
Not
\{\}
aka dict
\item
Not
\{\}
aka dict
\begin{itemize}
\begin{itemize}
...
@@ -503,28 +502,27 @@ and will limit the portability of your code
...
@@ -503,28 +502,27 @@ and will limit the portability of your code
\begin{frame}
{
Example preset compilation modes
}
\begin{frame}
{
Example preset compilation modes
}
\begin{itemize}
\begin{itemize}
\item
FAST
\_
RUN: default. Spends a lot of time on
\item
FAST
\_
RUN: default. Fastest execution, slowest compilation
compilation to get an executable that runs
\item
FAST
\_
COMPILE: Fastest compilation, slowest execution. No C code.
fast.
\item
FAST
\_
COMPILE: Doesn’t spend much time
compiling. Executable usually uses python
instead of compiled C code. Runs slow.
\item
DEBUG
\_
MODE: Adds lots of checks.
\item
DEBUG
\_
MODE: Adds lots of checks.
Raises error messages in situations other
Raises error messages in situations other
modes regard as fine.
modes regard as fine.
\item
optimizer=fast
\_
compile: as mode=FAST
\_
COMPILE, but with C code.
\item
optimizer=fast
\_
compile: as mode=FAST
\_
COMPILE, but with C code.
\item
theano.function(..., mode=``FAST
\_
COMPILE'')
\item
THEANO
\_
FLAGS=mode=FAST
\_
COMPILE python script.py
\end{itemize}
\end{itemize}
\end{frame}
\end{frame}
\begin{frame}
{
Compilation for GPU
}
\begin{frame}
{
Compilation for GPU
}
\begin{itemize}
\begin{itemize}
\item
Theano current back-end only supports 32 bit on GPU
\item
Theano current back-end only supports 32 bit on GPU
\item
libgpuarray (new-backend) support all dtype
\item
CUDA supports 64 bit, but is slow in gamer card
\item
CUDA supports 64 bit, but is slow in gamer card
\item
T.fscalar, T.fvector, T.fmatrix are all 32 bit
\item
T.fscalar, T.fvector, T.fmatrix are all 32 bit
\item
T.scalar, T.vector, T.matrix resolve to 32 bit or 64 bit depending on theano’s floatX flag
\item
T.scalar, T.vector, T.matrix resolve to 32 bit or 64 bit depending on theano’s floatX flag
\item
floatX is float64 by default, set it to float32
\item
floatX is float64 by default, set it to float32
\item
Set device flag to gpu (or a specific gpu, like gpu0)
\item
Set device flag to gpu (or a specific gpu, like gpu0)
\item
f
lag: warn
\_
float64=
{
'ignore', 'warn', 'raise', 'pdb'
}
\item
F
lag: warn
\_
float64=
{
'ignore', 'warn', 'raise', 'pdb'
}
\end{itemize}
\end{itemize}
\end{frame}
\end{frame}
...
@@ -552,6 +550,7 @@ modes regard as fine.
...
@@ -552,6 +550,7 @@ modes regard as fine.
>>> x = T.scalar('x')
>>> x = T.scalar('x')
>>> y = 2. * x
>>> y = 2. * x
>>> g = T.grad(y, x)
>>> g = T.grad(y, x)
# Print the not optimized graph
>>> theano.printing.debugprint(g)
>>> theano.printing.debugprint(g)
Elemwise
{
mul
}
[@A] ''
Elemwise
{
mul
}
[@A] ''
|Elemwise
{
second,no
_
inplace
}
[@B] ''
|Elemwise
{
second,no
_
inplace
}
[@B] ''
...
@@ -711,8 +710,6 @@ Elemwise{add,no_inplace} [@A] <TensorType(float64, vector)> ''
...
@@ -711,8 +710,6 @@ Elemwise{add,no_inplace} [@A] <TensorType(float64, vector)> ''
Backtrace when the node is created:
Backtrace when the node is created:
File "test.py", line 7, in <module>
File "test.py", line 7, in <module>
z = z + y
z = z + y
File "/home/nouiz/src/Theano/theano/tensor/var.py", line 122, in
__
add
__
return theano.tensor.basic.add(self, other)
\end{lstlisting}
\end{lstlisting}
\end{frame}
\end{frame}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论