提交 97eed47e authored 作者: Frederic's avatar Frederic

don't call sys.exit in previous commit.

上级 f36f5f25
...@@ -195,14 +195,10 @@ def shared(value, name=None, strict=False, allow_downcast=None, **kwargs): ...@@ -195,14 +195,10 @@ def shared(value, name=None, strict=False, allow_downcast=None, **kwargs):
# This was done on purpose, the rationale being that if kwargs # This was done on purpose, the rationale being that if kwargs
# were supplied, the user didn't want them to be ignored. # were supplied, the user didn't want them to be ignored.
except MemoryError: except MemoryError, e:
e.args = e.args + ('you might consider'
# Note: the following instruction is inappropriate as it is followed ' using \'theano.shared(..., borrow=True)\'',)
# automatically by a misleading message from line 207 raise
# sys.stderr.write('Insufficient memory available: you might consider'
# ' using \'theano.shared(..., borrow=True)\'')
sys.exit('Insufficient memory available: you might consider'
' using \'theano.shared(..., borrow=True)\'')
raise TypeError('No suitable SharedVariable constructor could be found', raise TypeError('No suitable SharedVariable constructor could be found',
(value, kwargs)) (value, kwargs))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论