Skip to content

Commit c716cf3

Browse files
authored
polish _remove_no_value_return_var() function (#36826) (#36830)
1 parent d8ffb26 commit c716cf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/paddle/fluid/dygraph/dygraph_to_static/convert_operators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def convert_ifelse(pred, true_fn, false_fn, true_args, false_args, return_vars):
214214

215215

216216
def _remove_no_value_return_var(out):
217-
if out and isinstance(out, tuple):
217+
if isinstance(out, tuple) and len(out) > 0:
218218
processed_out = out
219219
align_ret = out[0]
220220
if isinstance(align_ret, tuple):

0 commit comments

Comments
 (0)