提交 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 ...@@ -62,7 +62,7 @@ import copy
def get_version(): def get_version():
return 0.289 return 0.290
@cython.boundscheck(False) @cython.boundscheck(False)
def perform( def perform(
...@@ -392,7 +392,16 @@ def perform( ...@@ -392,7 +392,16 @@ def perform(
# this is a new vm-provided function # this is a new vm-provided function
# the C VM needs this because the exception manipulation # the C VM needs this because the exception manipulation
# done by raise_with_op is not implemented in C. # 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: else:
# old-style linkers raise their own exceptions # old-style linkers raise their own exceptions
raise raise
......
...@@ -17,7 +17,7 @@ from theano.gof import cmodule ...@@ -17,7 +17,7 @@ from theano.gof import cmodule
_logger = logging.getLogger('theano.scan_module.scan_perform') _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 need_reload = False
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论