提交 ec7571a1 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

Replace deprecation warning with error for return_steps

上级 840176c8
...@@ -391,12 +391,11 @@ def scan(fn, ...@@ -391,12 +391,11 @@ def scan(fn,
if isinstance(outs_info[i], dict): if isinstance(outs_info[i], dict):
# DEPRECATED : # DEPRECATED :
if outs_info[i].get('return_steps', None): if outs_info[i].get('return_steps', None):
_logger.warning( raise ValueError(
"Using `return_steps` has been deprecated. " "Using `return_steps` has been deprecated. "
"Simply select the entries you need using a " "Simply select the entries you need using a "
"subtensor. Scan will optimize memory " "subtensor. Scan will optimize memory "
"consumption, so do not worry about that.") "consumption, so do not worry about that.")
return_steps[i] = outs_info[i]['return_steps']
# END # END
if not isinstance(outs_info[i], dict): if not isinstance(outs_info[i], dict):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论