Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
8ad24e96
提交
8ad24e96
authored
3月 16, 2018
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix newer flake8 error
上级
f914681f
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
9 行增加
和
9 行删除
+9
-9
__init__.py
theano/compat/__init__.py
+1
-1
configparser.py
theano/configparser.py
+1
-1
vm.py
theano/gof/vm.py
+4
-4
scan_opt.py
theano/scan_module/scan_opt.py
+1
-1
basic.py
theano/tensor/basic.py
+1
-1
breakpoint.py
theano/tests/breakpoint.py
+1
-1
没有找到文件。
theano/compat/__init__.py
浏览文件 @
8ad24e96
...
@@ -130,7 +130,7 @@ def maybe_add_to_os_environ_pathlist(var, newpath):
...
@@ -130,7 +130,7 @@ def maybe_add_to_os_environ_pathlist(var, newpath):
if
newpath
not
in
oldpaths
:
if
newpath
not
in
oldpaths
:
newpaths
=
os
.
pathsep
.
join
([
newpath
]
+
oldpaths
)
newpaths
=
os
.
pathsep
.
join
([
newpath
]
+
oldpaths
)
os
.
environ
[
var
]
=
newpaths
os
.
environ
[
var
]
=
newpaths
except
:
except
Exception
:
pass
pass
__all__
+=
[
'maybe_add_to_os_environ_pathlist'
]
__all__
+=
[
'maybe_add_to_os_environ_pathlist'
]
theano/configparser.py
浏览文件 @
8ad24e96
...
@@ -124,7 +124,7 @@ class change_flags(object):
...
@@ -124,7 +124,7 @@ class change_flags(object):
try
:
try
:
for
k
,
v
in
iteritems
(
self
.
confs
):
for
k
,
v
in
iteritems
(
self
.
confs
):
v
.
__set__
(
None
,
self
.
new_vals
[
k
])
v
.
__set__
(
None
,
self
.
new_vals
[
k
])
except
:
except
Exception
:
self
.
__exit__
()
self
.
__exit__
()
raise
raise
...
...
theano/gof/vm.py
浏览文件 @
8ad24e96
...
@@ -245,7 +245,7 @@ class Loop(VM):
...
@@ -245,7 +245,7 @@ class Loop(VM):
t1
=
time
.
time
()
t1
=
time
.
time
()
self
.
call_counts
[
i
]
+=
1
self
.
call_counts
[
i
]
+=
1
self
.
call_times
[
i
]
+=
t1
-
t0
self
.
call_times
[
i
]
+=
t1
-
t0
except
:
except
Exception
:
link
.
raise_with_op
(
node
,
thunk
)
link
.
raise_with_op
(
node
,
thunk
)
else
:
else
:
for
cont
in
self
.
pre_call_clear
:
for
cont
in
self
.
pre_call_clear
:
...
@@ -253,7 +253,7 @@ class Loop(VM):
...
@@ -253,7 +253,7 @@ class Loop(VM):
try
:
try
:
for
thunk
,
node
in
zip
(
self
.
thunks
,
self
.
nodes
):
for
thunk
,
node
in
zip
(
self
.
thunks
,
self
.
nodes
):
thunk
()
thunk
()
except
:
except
Exception
:
link
.
raise_with_op
(
node
,
thunk
)
link
.
raise_with_op
(
node
,
thunk
)
...
@@ -289,7 +289,7 @@ class LoopGC(VM):
...
@@ -289,7 +289,7 @@ class LoopGC(VM):
for
old_s
in
old_storage
:
for
old_s
in
old_storage
:
old_s
[
0
]
=
None
old_s
[
0
]
=
None
i
+=
1
i
+=
1
except
:
except
Exception
:
link
.
raise_with_op
(
node
,
thunk
)
link
.
raise_with_op
(
node
,
thunk
)
else
:
else
:
for
cont
in
self
.
pre_call_clear
:
for
cont
in
self
.
pre_call_clear
:
...
@@ -300,7 +300,7 @@ class LoopGC(VM):
...
@@ -300,7 +300,7 @@ class LoopGC(VM):
thunk
()
thunk
()
for
old_s
in
old_storage
:
for
old_s
in
old_storage
:
old_s
[
0
]
=
None
old_s
[
0
]
=
None
except
:
except
Exception
:
link
.
raise_with_op
(
node
,
thunk
)
link
.
raise_with_op
(
node
,
thunk
)
...
...
theano/scan_module/scan_opt.py
浏览文件 @
8ad24e96
...
@@ -1007,7 +1007,7 @@ class ScanInplaceOptimizer(Optimizer):
...
@@ -1007,7 +1007,7 @@ class ScanInplaceOptimizer(Optimizer):
try
:
try
:
alloc_ops
+=
(
theano
.
gpuarray
.
GpuAlloc
,
alloc_ops
+=
(
theano
.
gpuarray
.
GpuAlloc
,
theano
.
gpuarray
.
GpuAllocEmpty
)
theano
.
gpuarray
.
GpuAllocEmpty
)
except
:
except
Exception
:
pass
pass
nodes
=
fgraph
.
toposort
()[::
-
1
]
nodes
=
fgraph
.
toposort
()[::
-
1
]
...
...
theano/tensor/basic.py
浏览文件 @
8ad24e96
...
@@ -3838,7 +3838,7 @@ class Split(Op):
...
@@ -3838,7 +3838,7 @@ class Split(Op):
try
:
try
:
len_along_axis
=
x
.
shape
[
axis
]
len_along_axis
=
x
.
shape
[
axis
]
except
:
except
Exception
:
raise
ValueError
(
'Split.perform() with axis=(
%
s) is invalid'
raise
ValueError
(
'Split.perform() with axis=(
%
s) is invalid'
' for x.shape==(
%
s)'
' for x.shape==(
%
s)'
%
(
axis
,
x
.
shape
))
%
(
axis
,
x
.
shape
))
...
...
theano/tests/breakpoint.py
浏览文件 @
8ad24e96
...
@@ -104,7 +104,7 @@ class PdbBreakpoint(Op):
...
@@ -104,7 +104,7 @@ class PdbBreakpoint(Op):
if
condition
:
if
condition
:
try
:
try
:
monitored
=
[
np
.
asarray
(
inp
)
for
inp
in
inputs
[
1
:]]
monitored
=
[
np
.
asarray
(
inp
)
for
inp
in
inputs
[
1
:]]
except
:
except
Exception
:
raise
ValueError
(
"Some of the inputs to the PdbBreakpoint op "
raise
ValueError
(
"Some of the inputs to the PdbBreakpoint op "
"'
%
s' could not be casted to NumPy arrays"
%
"'
%
s' could not be casted to NumPy arrays"
%
self
.
name
)
self
.
name
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论