Skip to content

Commit

Permalink
fix filter parameter in to_static
Browse files Browse the repository at this point in the history
  • Loading branch information
cyber-pioneer committed Sep 27, 2023
1 parent 0b70e22 commit f584c2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions paddle/fluid/eager/to_static/run_program_op_func.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,7 @@ inline void newir_run_program_ad_func(
// Set TensorWrappers
grad_node->SetFwdX(filter_x);

auto filter_params =
newir_filter_unused_input_var_in_backward(params, "bp", attrs);
grad_node->SetFwdParams(filter_params);
grad_node->SetFwdParams(params);

grad_node->SetStepScope(step_scope); // just for set useable.

Expand Down
2 changes: 1 addition & 1 deletion python/paddle/decomposition/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def dropout_composite(x, seed_tensor, p, is_test, mode, seed, fix_seed):
shape=x.shape, value=(1.0 - p), dtype=x.dtype
), cast(mask, uint8_type)
else:
return x, cast(
return x * 1.0, cast(
mask, uint8_type
) # assign(x), cast(mask, mask, core.VarDesc.VarType.UINT8)
else:
Expand Down

0 comments on commit f584c2f

Please sign in to comment.