提交 cbb534a8 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Mention duplicated values in warning messages.

上级 bf9cf619
......@@ -776,9 +776,9 @@ AddConfigVar('warn.round',
AddConfigVar(
'warn.inc_subtensor1_opt',
"Warn if previous versions of Theano (before 0.10) could have "
"given incorrect results for inc_subtensor when indexing with "
"one array of integers. An incorrect optimization was applied "
"when computing set_subtensor(zeros[idx], x)[idx].",
"given incorrect results when computing "
"inc_subtensor(zeros[idx], x)[idx], when idx is an array of integers "
"with duplicated values.",
BoolParam(warn_default('0.10')),
in_c_key=False)
......
......@@ -3514,7 +3514,11 @@ def local_adv_sub1_adv_inc_sub1(node):
'Your current code is fine, but Theano versions '
'between 0.7rc1 and 0.10 (or development versions '
'between Nov. 2014 and May 2017) '
'might have given incorrect results. '
'might have given incorrect results. This graph has '
'following pattern: inc_subtensor(zeros[idx], x)[idx], '
'where idx is an array of integers. This used to be '
'optimized to "x", which is incorrect if there are '
'duplicated indices in idx. '
'To disable this warning, set the Theano flag '
'warn.inc_subtensor1_opt to False.')
return
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论