Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
589b5926
提交
589b5926
authored
7月 29, 2016
作者:
Frédéric Bastien
提交者:
GitHub
7月 29, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4806 from nouiz/python32bit
Fix daily buildbot error Python32bit
上级
0d21995f
23e0ad2e
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
5 行增加
和
6 行删除
+5
-6
test_vm.py
theano/gof/tests/test_vm.py
+1
-1
opt.py
theano/tensor/opt.py
+2
-2
test_opt.py
theano/tensor/tests/test_opt.py
+2
-3
没有找到文件。
theano/gof/tests/test_vm.py
浏览文件 @
589b5926
...
@@ -230,7 +230,7 @@ def test_partial_function_with_updates():
...
@@ -230,7 +230,7 @@ def test_partial_function_with_updates():
def
check_updates
(
linker_name
):
def
check_updates
(
linker_name
):
x
=
tensor
.
lscalar
(
'input'
)
x
=
tensor
.
lscalar
(
'input'
)
y
=
theano
.
shared
(
1
,
name
=
'global'
)
y
=
theano
.
shared
(
numpy
.
asarray
(
1
,
'int64'
)
,
name
=
'global'
)
f
=
theano
.
function
([
x
],
[
x
,
x
+
34
],
updates
=
[(
y
,
x
+
1
)],
mode
=
Mode
(
f
=
theano
.
function
([
x
],
[
x
,
x
+
34
],
updates
=
[(
y
,
x
+
1
)],
mode
=
Mode
(
optimizer
=
None
,
linker
=
linker_name
))
optimizer
=
None
,
linker
=
linker_name
))
g
=
theano
.
function
([
x
],
[
x
-
6
],
updates
=
[(
y
,
y
+
3
)],
mode
=
Mode
(
g
=
theano
.
function
([
x
],
[
x
-
6
],
updates
=
[(
y
,
y
+
3
)],
mode
=
Mode
(
...
...
theano/tensor/opt.py
浏览文件 @
589b5926
...
@@ -6974,9 +6974,9 @@ class FusionOptimizer(Optimizer):
...
@@ -6974,9 +6974,9 @@ class FusionOptimizer(Optimizer):
print
(
blanc
,
" callback_time"
,
prof
[
5
],
file
=
stream
)
print
(
blanc
,
" callback_time"
,
prof
[
5
],
file
=
stream
)
if
prof
[
5
]
>
1
:
if
prof
[
5
]
>
1
:
print
(
blanc
,
" callbacks_time"
,
file
=
stream
)
print
(
blanc
,
" callbacks_time"
,
file
=
stream
)
for
i
in
sorted
(
iteritems
(
prof
[
6
]),
key
=
lambda
a
:
a
[
1
]):
for
i
in
sorted
(
iteritems
(
prof
[
6
]),
key
=
lambda
a
:
a
[
1
])
[::
-
1
]
:
if
i
[
1
]
>
0
:
if
i
[
1
]
>
0
:
print
(
i
)
print
(
blanc
,
" "
,
i
)
print
(
blanc
,
" time_toposort"
,
prof
[
7
],
file
=
stream
)
print
(
blanc
,
" time_toposort"
,
prof
[
7
],
file
=
stream
)
...
...
theano/tensor/tests/test_opt.py
浏览文件 @
589b5926
...
@@ -1776,14 +1776,13 @@ def test_local_useless_subtensor():
...
@@ -1776,14 +1776,13 @@ def test_local_useless_subtensor():
((
slice
(
0
,
3
),
slice
(
0
,
13
)),
True
),
((
slice
(
0
,
3
),
slice
(
0
,
13
)),
True
),
((
slice
(
0
,
3
),
slice
(
0
,
2
)),
False
),
((
slice
(
0
,
3
),
slice
(
0
,
2
)),
False
),
((
slice
(
0
,
1
),
slice
(
0
,
None
)),
False
),
((
slice
(
0
,
1
),
slice
(
0
,
None
)),
False
),
((
slice
(
0
,
1
),
1
),
False
),
((
slice
(
0
,
1
),
1
),
False
)]:
]:
f
=
function
([
x
],
tensor
.
exp
(
x_c
)
.
__getitem__
(
dims
),
mode
=
mode_opt
)
f
=
function
([
x
],
tensor
.
exp
(
x_c
)
.
__getitem__
(
dims
),
mode
=
mode_opt
)
# theano.printing.debugprint(f)
# theano.printing.debugprint(f)
prog
=
f
.
maker
.
fgraph
.
toposort
()
prog
=
f
.
maker
.
fgraph
.
toposort
()
if
res
:
if
res
:
assert
isinstance
(
prog
[
0
]
.
op
,
theano
.
tensor
.
SpecifyShape
),
dims
assert
isinstance
(
prog
[
0
]
.
op
,
theano
.
tensor
.
SpecifyShape
),
dims
assert
prog
[
1
]
.
op
==
tensor
.
exp
,
dims
assert
prog
[
1
]
.
op
==
tensor
.
exp
,
(
dims
,
prog
)
assert
len
(
prog
)
==
2
,
dims
assert
len
(
prog
)
==
2
,
dims
else
:
else
:
assert
any
([
isinstance
(
node
.
op
,
Subtensor
)
for
node
in
prog
])
assert
any
([
isinstance
(
node
.
op
,
Subtensor
)
for
node
in
prog
])
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论