Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
9c9bbd0a
提交
9c9bbd0a
authored
8月 08, 2021
作者:
Brandon T. Willard
提交者:
Brandon T. Willard
9月 15, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Misc. Scan comment updates
上级
52413fc6
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
11 行增加
和
12 行删除
+11
-12
basic.py
aesara/scan/basic.py
+8
-7
opt.py
aesara/scan/opt.py
+0
-1
utils.py
aesara/scan/utils.py
+3
-4
没有找到文件。
aesara/scan/basic.py
浏览文件 @
9c9bbd0a
...
...
@@ -896,13 +896,13 @@ def scan(
)
tensor_update
=
aet
.
as_tensor_variable
(
input
.
update
)
sit_sot_inner_outputs
.
append
(
tensor_update
)
# Not
that pos is not a negative index. The sign of pos
is used
# Not
e that `pos` is not a negative index. The sign of `pos`
is used
# as a flag to indicate if this output should be part of the
# update rules or part of the standard outputs of
scan
.
# If `pos` is positive th
a
n it corresponds to the standard
# outputs of
scan
and it refers to output of index `pos`. If `pos`
# is negative that it corresponds to update rules of
scan
and it
# refers to
update rule of index -1 - `
pos`.
# update rules or part of the standard outputs of
`scan`
.
# If `pos` is positive th
e
n it corresponds to the standard
# outputs of
`scan`
and it refers to output of index `pos`. If `pos`
# is negative that it corresponds to update rules of
`scan`
and it
# refers to
the update rule with index `-1 -
pos`.
sit_sot_rightOrder
.
append
(
-
1
-
len
(
sit_sot_shared
))
sit_sot_shared
.
append
(
input
.
variable
)
givens
[
input
.
variable
]
=
new_var
...
...
@@ -913,6 +913,7 @@ def scan(
shared_inner_outputs
.
append
(
input
.
update
)
givens
[
input
.
variable
]
=
new_var
n_shared_outs
+=
1
n_sit_sot
=
len
(
sit_sot_inner_inputs
)
# Step 5.4 Outputs with no taps used in the input
n_nit_sot
=
0
...
...
@@ -1006,7 +1007,7 @@ def scan(
# gpuarray is imported here, instead of being imported on top of
# the file because that would force on the user some dependencies that we
# might do not want to. Currently we are working on removing the
# dependencies on sandbox code completel
e
y.
# dependencies on sandbox code completely.
from
aesara
import
gpuarray
if
gpuarray
.
pygpu_activated
:
...
...
aesara/scan/opt.py
浏览文件 @
9c9bbd0a
...
...
@@ -1736,7 +1736,6 @@ class ScanMerge(GlobalOptimizer):
return
ls
for
idx
,
nd
in
enumerate
(
nodes
):
# Seq
inner_ins
[
idx
]
.
append
(
rename
(
nd
.
op
.
inner_seqs
(
nd
.
op
.
inputs
),
idx
))
outer_ins
+=
rename
(
nd
.
op
.
outer_seqs
(
nd
.
inputs
),
idx
)
...
...
aesara/scan/utils.py
浏览文件 @
9c9bbd0a
...
...
@@ -39,7 +39,6 @@ from aesara.tensor.subtensor import set_subtensor
from
aesara.tensor.var
import
TensorConstant
# Logging function for sending warning or info
_logger
=
logging
.
getLogger
(
"aesara.scan.utils"
)
...
...
@@ -402,9 +401,9 @@ def get_updates_and_outputs(ls):
list of outputs and the stopping condition returned by the
lambda expression and arrange them in a predefined order.
WRITEME: what is the type of ls? how is it formatted?
if it's not in the predefined order already, how does
this function know how to put it in that
order?
WRITEME: what is the type of ls? how is it formatted?
if it's not in the
predefined order already, how does this function know how to put it in that
order?
"""
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论