Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
00ed78d2
提交
00ed78d2
authored
2月 19, 2015
作者:
Frédéric Bastien
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2511 from sisp/get_idx_list
Inconsistent function call of imported get_idx_list
上级
4d8536b5
428e4f8c
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
3 行增加
和
5 行删除
+3
-5
opt.py
theano/tensor/opt.py
+3
-5
没有找到文件。
theano/tensor/opt.py
浏览文件 @
00ed78d2
...
...
@@ -830,8 +830,7 @@ class ShapeFeature(object):
# The current Subtensor always put constant index in the graph.
# This was not True in the past. So call the Subtensor function
# that will return the right index.
idx
=
theano
.
tensor
.
subtensor
.
get_idx_list
(
s_i
.
owner
.
inputs
,
s_i
.
owner
.
op
.
idx_list
)
idx
=
get_idx_list
(
s_i
.
owner
.
inputs
,
s_i
.
owner
.
op
.
idx_list
)
assert
len
(
idx
)
==
1
idx
=
idx
[
0
]
try
:
...
...
@@ -1865,8 +1864,7 @@ def local_useless_inc_subtensor(node):
# Check that we keep all the original data.
# Put the constant inputs in the slice.
idx_cst
=
theano
.
tensor
.
subtensor
.
get_idx_list
(
node
.
inputs
[
1
:],
node
.
op
.
idx_list
)
idx_cst
=
get_idx_list
(
node
.
inputs
[
1
:],
node
.
op
.
idx_list
)
if
all
(
isinstance
(
e
,
slice
)
and
e
.
start
is
None
and
e
.
stop
is
None
and
(
e
.
step
is
None
or
T
.
extract_constant
(
e
.
step
)
==
-
1
)
for
e
in
idx_cst
):
...
...
@@ -2358,7 +2356,7 @@ def local_subtensor_of_dot(node):
a
=
node
.
inputs
[
0
]
.
owner
.
inputs
[
0
]
b
=
node
.
inputs
[
0
]
.
owner
.
inputs
[
1
]
idx_list
=
theano
.
tensor
.
subtensor
.
get_idx_list
(
node
.
inputs
,
node
.
op
.
idx_list
)
idx_list
=
get_idx_list
(
node
.
inputs
,
node
.
op
.
idx_list
)
num_a_indices
=
min
(
a
.
ndim
-
1
,
len
(
idx_list
))
a_indices
=
idx_list
[:
num_a_indices
]
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论