Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
4fab8bf4
提交
4fab8bf4
authored
6月 15, 2013
作者:
Olivier Delalleau
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Small typo fixes + unsafe string comparison fix
上级
05f36e3e
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
11 行增加
和
10 行删除
+11
-10
debug_faq.txt
doc/tutorial/debug_faq.txt
+7
-7
monitormode.py
theano/compile/monitormode.py
+2
-2
pfunc.py
theano/compile/pfunc.py
+2
-1
没有找到文件。
doc/tutorial/debug_faq.txt
浏览文件 @
4fab8bf4
...
...
@@ -288,12 +288,12 @@ can be achieved as follows:
To help understand what is happening in your graph, you can
disable the ``local_elemwise_fusion`` and all ``inplace``
optimizations. The first is a speed optimization that merge elemwise
operations together. This make it harder to know which particular
elemwise cause
the problem. The second optimization make some ops
output
overwrite its input. So, if an op create
a bad output, you
w
on't be able see the input that was overwriten in the ``post_fun
``
function. To disable those optimization (with a Theano version after
optimizations. The first is a speed optimization that merge
s
elemwise
operations together. This make
s
it harder to know which particular
elemwise cause
s the problem. The second optimization makes some ops'
output
s overwrite their inputs. So, if an op creates
a bad output, you
w
ill not be able to see the input that was overwriten in the ``post_func
``
function. To disable those optimization
s
(with a Theano version after
0.6rc3), define the MonitorMode like this:
.. code-block:: python
...
...
@@ -311,7 +311,7 @@ function. To disable those optimization (with a Theano version after
mode with MonitorMode, as you need to define what you monitor.
To be sure all inputs of the node are available during the call to
``post_func``, you
also must
disable the garbage collector. Otherwise,
``post_func``, you
must also
disable the garbage collector. Otherwise,
the execution of the node can garbage collect its inputs that aren't
needed anymore by the Theano function. This can be done with the Theano
flag:
...
...
theano/compile/monitormode.py
浏览文件 @
4fab8bf4
...
...
@@ -37,14 +37,14 @@ class MonitorMode(Mode):
:param optimizer: The optimizer to use. One may use for instance
'fast_compile' to skip optimizations.
:param linker: DO NOT USE. This mode use its own linker.
:param linker: DO NOT USE. This mode use
s
its own linker.
The parameter is needed to allow selecting optimizers to use.
"""
self
.
pre_func
=
pre_func
self
.
post_func
=
post_func
wrap_linker
=
theano
.
gof
.
WrapLinkerMany
([
theano
.
gof
.
OpWiseCLinker
()],
[
self
.
eval
])
if
optimizer
is
'default'
:
if
optimizer
==
'default'
:
optimizer
=
theano
.
config
.
optimizer
if
(
linker
is
not
None
and
not
isinstance
(
linker
.
mode
,
MonitorMode
)):
...
...
theano/compile/pfunc.py
浏览文件 @
4fab8bf4
...
...
@@ -442,7 +442,8 @@ def pfunc(params, outputs=None, mode=None, updates=None, givens=None,
if
len
(
updates
)
>
0
and
any
(
isinstance
(
v
,
Variable
)
for
v
in
iter_over_pairs
(
updates
)):
raise
ValueError
(
"The updates parameter must an OrderedDict/dict or a list of list/tuple with 2 elements"
)
"The updates parameter must be an OrderedDict/dict or a list of "
"lists/tuples with 2 elements"
)
# transform params into theano.compile.In objects.
inputs
=
[
_pfunc_param_to_in
(
p
,
allow_downcast
=
allow_input_downcast
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论