提交 10f2615f authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Also match Windows version of paths

This should fix unhelpful stack traces on Windows.
上级 22289903
...@@ -76,13 +76,13 @@ def add_tag_trace(thing, user_line=1): ...@@ -76,13 +76,13 @@ def add_tag_trace(thing, user_line=1):
while tr: while tr:
file_path = tr[-1][0] file_path = tr[-1][0]
rm = False rm = False
for p in ["theano/tensor/", for p in ["theano/tensor/", "theano\\tensor\\",
"theano/gof/", "theano/gof/", "theano\\gof\\",
"theano/scalar/basic.py", "theano/scalar/basic.py", "theano\\scalar\\basic.py",
"theano/sandbox/", "theano/sandbox/", "theano\\sandbox\\",
"theano/scan_module/", "theano/scan_module/", "theano\\scan_module\\",
"theano/sparse/", "theano/sparse/", "theano\\sparse\\",
"theano/typed_list/", "theano/typed_list/", "theano\\typed_list\\",
]: ]:
if p in file_path: if p in file_path:
tr = tr[:-1] tr = tr[:-1]
......
...@@ -702,8 +702,8 @@ class TensorVariable(_tensor_py_operators, Variable): ...@@ -702,8 +702,8 @@ class TensorVariable(_tensor_py_operators, Variable):
while x: while x:
file_path = x[-1][0] file_path = x[-1][0]
rm = False rm = False
for p in ["theano/tensor/", for p in ["theano/tensor/", "theano\\tensor\\",
"theano/gof/"]: "theano/gof/", "theano\\tensor\\"]:
if p in file_path: if p in file_path:
x = x[:-1] x = x[:-1]
nb_rm += 1 nb_rm += 1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论