Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
7b3b7d29
提交
7b3b7d29
authored
5月 03, 2015
作者:
David Warde-Farley
提交者:
Arnaud Bergeron
6月 22, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Python 3-compatible function attributes.
上级
feabe7f9
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
5 行增加
和
6 行删除
+5
-6
docgen.py
doc/scripts/docgen.py
+1
-1
debugmode.py
theano/compile/debugmode.py
+2
-3
utils.py
theano/gof/utils.py
+2
-2
没有找到文件。
doc/scripts/docgen.py
浏览文件 @
7b3b7d29
...
@@ -35,7 +35,7 @@ def Op_to_RoutineDoc(op, routine_doc, module_name=None):
...
@@ -35,7 +35,7 @@ def Op_to_RoutineDoc(op, routine_doc, module_name=None):
# Set the routine's line number.
# Set the routine's line number.
if
hasattr
(
func
,
'func_code'
):
if
hasattr
(
func
,
'func_code'
):
routine_doc
.
lineno
=
func
.
func_code
.
co_firstlineno
routine_doc
.
lineno
=
func
.
__code__
.
co_firstlineno
else
:
else
:
# [XX] I should probably use UNKNOWN here??
# [XX] I should probably use UNKNOWN here??
# dvarrazzo: if '...' is to be changed, also check that
# dvarrazzo: if '...' is to be changed, also check that
...
...
theano/compile/debugmode.py
浏览文件 @
7b3b7d29
...
@@ -1770,9 +1770,8 @@ class _Linker(gof.link.LocalLinker):
...
@@ -1770,9 +1770,8 @@ class _Linker(gof.link.LocalLinker):
# Pure ops don't really have a perform ( or their perform just
# Pure ops don't really have a perform ( or their perform just
# raises an not implemented exception), so in those cases we
# raises an not implemented exception), so in those cases we
# consider that we don't have a python implementation
# consider that we don't have a python implementation
if
((
self
.
maker
.
mode
.
check_py_code
or
thunks_c
[
-
1
]
is
None
)
and
if
(
self
.
maker
.
mode
.
check_py_code
or
thunks_c
[
-
1
]
is
None
)
and
\
(
node
.
op
.
perform
.
func_code
!=
node
.
op
.
perform
.
__code__
!=
gof
.
op
.
PureOp
.
perform
.
__code__
:
gof
.
op
.
PureOp
.
perform
.
func_code
)):
thunk
=
node
.
op
.
make_py_thunk
(
node
,
storage_map
,
compute_map
,
thunk
=
node
.
op
.
make_py_thunk
(
node
,
storage_map
,
compute_map
,
no_recycling
)
no_recycling
)
thunks_py
.
append
(
thunk
)
thunks_py
.
append
(
thunk
)
...
...
theano/gof/utils.py
浏览文件 @
7b3b7d29
...
@@ -306,7 +306,7 @@ FALL_THROUGH = Keyword("FALL_THROUGH")
...
@@ -306,7 +306,7 @@ FALL_THROUGH = Keyword("FALL_THROUGH")
def
comm_guard
(
type1
,
type2
):
def
comm_guard
(
type1
,
type2
):
def
wrap
(
f
):
def
wrap
(
f
):
old_f
=
f
.
func_globals
[
f
.
__name__
]
old_f
=
f
.
__globals__
[
f
.
__name__
]
def
new_f
(
arg1
,
arg2
,
*
rest
):
def
new_f
(
arg1
,
arg2
,
*
rest
):
if
((
type1
is
ANY_TYPE
or
isinstance
(
arg1
,
type1
))
and
if
((
type1
is
ANY_TYPE
or
isinstance
(
arg1
,
type1
))
and
...
@@ -345,7 +345,7 @@ def comm_guard(type1, type2):
...
@@ -345,7 +345,7 @@ def comm_guard(type1, type2):
def
type_guard
(
type1
):
def
type_guard
(
type1
):
def
wrap
(
f
):
def
wrap
(
f
):
old_f
=
f
.
func_globals
[
f
.
__name__
]
old_f
=
f
.
__globals__
[
f
.
__name__
]
def
new_f
(
arg1
,
*
rest
):
def
new_f
(
arg1
,
*
rest
):
if
(
type1
is
ANY_TYPE
or
isinstance
(
arg1
,
type1
)):
if
(
type1
is
ANY_TYPE
or
isinstance
(
arg1
,
type1
)):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论