Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
21471c14
提交
21471c14
authored
7月 24, 2015
作者:
Pascal Lamblin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3077 from julianser/new_stacktrace_fix
Further work on issue #3018.
上级
d7d722fa
1b6e3b78
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
27 行增加
和
20 行删除
+27
-20
fg.py
theano/gof/fg.py
+8
-6
link.py
theano/gof/link.py
+9
-7
op.py
theano/gof/op.py
+9
-6
utils.py
theano/gof/utils.py
+1
-1
opt.py
theano/tensor/opt.py
+0
-0
没有找到文件。
theano/gof/fg.py
浏览文件 @
21471c14
...
...
@@ -331,15 +331,17 @@ class FunctionGraph(utils.object2):
# if there is no path then r isn't really a graph input so we shouldn't be running error
# handler code in the first place
assert
path
is
not
None
tr
=
getattr
(
r
.
tag
,
'trace'
,
None
)
tr
=
getattr
(
r
.
tag
,
'trace'
,
[]
)
detailed_err_msg
=
""
if
tr
:
sio
=
StringIO
()
traceback
.
print_list
(
tr
,
sio
)
tr
=
sio
.
getvalue
()
if
len
(
tr
)
>
0
:
detailed_err_msg
+=
"
\n
Backtrace when the variable is created:
\n
"
detailed_err_msg
+=
str
(
tr
)
# Print separate message for each element in
# the list of batcktraces
sio
=
StringIO
()
for
subtr
in
tr
:
traceback
.
print_list
(
subtr
,
sio
)
detailed_err_msg
+=
str
(
sio
.
getvalue
())
raise
MissingInputError
(
'A variable that is an input to the graph was '
'neither provided as an input to the function '
...
...
theano/gof/link.py
浏览文件 @
21471c14
...
...
@@ -156,14 +156,16 @@ def raise_with_op(node, thunk=None, exc_info=None, storage_map=None):
"HINT: Use another linker then the c linker to"
" have the inputs shapes and strides printed."
)
# Print node backtrace
tr
=
getattr
(
node
.
outputs
[
0
]
.
tag
,
'trace'
,
None
)
if
tr
:
sio
=
StringIO
()
traceback
.
print_list
(
tr
,
sio
)
tr
=
sio
.
getvalue
()
# Print node backtraces
tr
=
getattr
(
node
.
outputs
[
0
]
.
tag
,
'trace'
,
[])
if
len
(
tr
)
>
0
:
detailed_err_msg
+=
"
\n
Backtrace when the node is created:
\n
"
detailed_err_msg
+=
str
(
tr
)
# Print separate message for each element in the list of batcktraces
sio
=
StringIO
()
for
subtr
in
tr
:
traceback
.
print_list
(
subtr
,
sio
)
detailed_err_msg
+=
str
(
sio
.
getvalue
())
else
:
hints
.
append
(
"HINT: Re-running with most Theano optimization disabled could"
...
...
theano/gof/op.py
浏览文件 @
21471c14
...
...
@@ -458,14 +458,17 @@ class PureOp(object):
detailed_err_msg
=
(
"For compute_test_value, one input test value does not"
" have the requested type.
\n
"
)
tr
=
getattr
(
v
.
tag
,
'trace'
,
None
)
if
tr
:
sio
=
StringIO
()
traceback
.
print_list
(
tr
,
sio
)
tr
=
sio
.
getvalue
()
tr
=
getattr
(
v
.
tag
,
'trace'
,
[])
if
len
(
tr
)
>
0
:
detailed_err_msg
+=
(
"
\n
Backtrace when that variable is created:
\n
"
)
detailed_err_msg
+=
str
(
tr
)
# Print separate message for each element in the list
# of batcktraces
sio
=
StringIO
()
for
subtr
in
tr
:
traceback
.
print_list
(
subtr
,
sio
)
detailed_err_msg
+=
str
(
sio
.
getvalue
())
detailed_err_msg
+=
(
"
\n
The error when converting the test value to that"
" variable type:"
)
...
...
theano/gof/utils.py
浏览文件 @
21471c14
...
...
@@ -94,7 +94,7 @@ def add_tag_trace(thing, user_line=1):
# The order is from the oldest to the newest
if
len
(
tr
)
>
user_line
:
tr
=
tr
[
-
user_line
:]
thing
.
tag
.
trace
=
tr
thing
.
tag
.
trace
=
[
tr
]
return
thing
...
...
theano/tensor/opt.py
浏览文件 @
21471c14
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论