未验证 提交 193ab32c 编写于 作者: L Li Min 提交者: GitHub

fix is_test bug in fused_feedforward. (#43508)

上级 c62a7e25
......@@ -130,12 +130,11 @@ def fused_feedforward(x,
'pre_layer_norm', pre_layer_norm, 'ln1_epsilon', ln1_epsilon,
'ln2_epsilon', ln2_epsilon, 'act_method', activation,
'dropout1_rate', dropout1_rate, 'dropout2_rate', dropout2_rate,
"dropout1_is_test", not training, "dropout2_is_test", not training,
"dropout1_fix_seed", seed is not None, "dropout2_fix_seed", seed
is not None, "dropout1_seed", seed if seed is not None else 0,
"dropout2_seed", seed if seed is not None else 0,
'dropout1_implementation', mode, 'dropout2_implementation', mode,
'ring_id', ring_id)
"is_test", not training, "dropout1_fix_seed", seed is not None,
"dropout2_fix_seed", seed is not None, "dropout1_seed",
seed if seed is not None else 0, "dropout2_seed",
seed if seed is not None else 0, 'dropout1_implementation', mode,
'dropout2_implementation', mode, 'ring_id', ring_id)
return out
helper = LayerHelper("fused_feedforward")
......@@ -202,8 +201,7 @@ def fused_feedforward(x,
'pre_layer_norm': pre_layer_norm,
'ln1_epsilon': ln1_epsilon,
'ln2_epsilon': ln2_epsilon,
'dropout1_is_test': not training,
'dropout2_is_test': not training,
'is_test': not training,
'dropout1_fix_seed': seed is not None,
'dropout2_fix_seed': seed is not None,
'dropout1_seed': seed if seed is not None else 0,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册