提交 3cb93e44 authored 作者: Frédéric Bastien's avatar Frédéric Bastien

Merge pull request #3634 from nouiz/scan_err

Better error in Scan
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -62,7 +62,7 @@ import copy
def get_version():
return 0.289
return 0.290
@cython.boundscheck(False)
def perform(
......@@ -392,7 +392,16 @@ def perform(
# this is a new vm-provided function
# the C VM needs this because the exception manipulation
# done by raise_with_op is not implemented in C.
gof.link.raise_with_op(fn.nodes[fn.position_of_error])
if hasattr(fn, 'thunks'):
# For the CVM
gof.link.raise_with_op(fn.nodes[fn.position_of_error],
fn.thunks[fn.position_of_error])
else:
# For the c linker
# We don't have access from python to all the
# temps values So for now, we just don't print
# the extra shapes/strides info
gof.vm.raise_with_op(fn.nodes[fn.position_of_error])
else:
# old-style linkers raise their own exceptions
raise
......
......@@ -17,7 +17,7 @@ from theano.gof import cmodule
_logger = logging.getLogger('theano.scan_module.scan_perform')
version = 0.289 # must match constant returned in function get_version()
version = 0.290 # must match constant returned in function get_version()
need_reload = False
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论