Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
8bc5e5ea
提交
8bc5e5ea
authored
3月 21, 2010
作者:
Razvan Pascanu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed some comments in scan
上级
dc57295f
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
20 行增加
和
13 行删除
+20
-13
scan.py
theano/scan.py
+20
-13
没有找到文件。
theano/scan.py
浏览文件 @
8bc5e5ea
...
@@ -269,16 +269,16 @@ def scan(fn, sequences=[], outputs_info=[], non_sequences=[],
...
@@ -269,16 +269,16 @@ def scan(fn, sequences=[], outputs_info=[], non_sequences=[],
* ``initial`` -- Theano variable containing the initial state of the output
* ``initial`` -- Theano variable containing the initial state of the output
* ``taps`` -- temporal taps to use for this output. The taps are given as a
* ``taps`` -- temporal taps to use for this output. The taps are given as a
list of ints (only negative .. since you can not use future values of outputs),
list of ints (only negative .. since you can not use future values of outputs),
with the same meaning as for ``sequences`` (see above).
with the same meaning as for ``sequences`` (see above).
* ``inplace`` -- theano variable pointing to one of the input sequences; this
* ``inplace`` -- theano variable pointing to one of the input sequences; this
flag tells scan that the output should be computed in the memory spaced occupied
flag tells scan that the output should be computed in the memory spaced occupied
by that input sequence. Note that scan will only do this if allowed by the
by that input sequence. Note that scan will only do this if allowed by the
rest of your computational graph.
rest of your computational graph.
* ``return_steps`` how many steps to return from your output. If not given, or
* ``return_steps`` how many steps to return from your output. If not given, or
0 scan will return all steps, otherwise it will return the last ``return_steps``.
0 scan will return all steps, otherwise it will return the last ``return_steps``.
Note that if you set this to something else then 0, scan will always be smart
Note that if you set this to something else then 0, scan will always be smart
about the amount of memory it allocates for a given input.
about the amount of memory it allocates for a given input.
If the function applied recursively uses only the
If the function applied recursively uses only the
previous value of the output, the initial state should have
previous value of the output, the initial state should have
...
@@ -297,13 +297,20 @@ def scan(fn, sequences=[], outputs_info=[], non_sequences=[],
...
@@ -297,13 +297,20 @@ def scan(fn, sequences=[], outputs_info=[], non_sequences=[],
the following :
the following :
* if you do not wrap an output in a dictionary, scan will wrap it for you
* if you do not wrap an output in a dictionary, scan will wrap it for you
assuming that you use only the last step of the output ( i.e. it makes your tap
assuming that you use only the last step of the output ( i.e. it makes your tap
value list equal to [-1]) and that it is not computed inplace
value list equal to [-1]) and that it is not computed inplace
* if you wrap an output in a dictionary but you do not provide any taps, but
* if you wrap an output in a dictionary but you do not provide any taps, but
you provide an initial state it will assume that you are using only a tap value
you provide an initial state it will assume that you are using only a tap value
of -1
of -1
* if you wrap an output in a dictionary but you do not provide any initial state,
* if you wrap an output in a dictionary but you do not provide any initial state,
it assumes that you are not using any form of taps
it assumes that you are not using any form of taps
* if you provide a ``None`` scan assumes that you will not use any taps for this
output
If you did not provide any information for your outputs, scan will assume by default
that you are not using any taps for any of the input. If you provide information for
just a subset of outputs, scan will not know to which outputs these information
corresponds and will raise an error.
:param non_sequences:
:param non_sequences:
Parameters over which scan should not iterate. These parameters are
Parameters over which scan should not iterate. These parameters are
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论