diff --git a/python/paddle/fluid/dygraph/dygraph_to_static/ifelse_transformer.py b/python/paddle/fluid/dygraph/dygraph_to_static/ifelse_transformer.py index 997c6cad76daf09a119da6ea06d4067a6c9a15c5..ef8871a5fc53fc3fc7381a38119f4f9416e36a32 100644 --- a/python/paddle/fluid/dygraph/dygraph_to_static/ifelse_transformer.py +++ b/python/paddle/fluid/dygraph/dygraph_to_static/ifelse_transformer.py @@ -460,7 +460,7 @@ def create_convert_ifelse_node(return_name_ids, false_func, is_if_expr=False): """ - Create `fluid.dygraph.dygraph_to_static.convert_operators.convert_ifelse( + Create `paddle.jit.dygraph_to_static.convert_operators.convert_ifelse( pred, true_fn, false_fn, true_args, false_args, return_vars)` to replace original `python if/else` statement. """ @@ -491,7 +491,7 @@ def create_convert_ifelse_node(return_name_ids, return_vars = create_name_nodes(return_name_ids) convert_ifelse_layer = gast.parse( - 'fluid.dygraph.dygraph_to_static.convert_operators.convert_ifelse(' + 'paddle.jit.dygraph_to_static.convert_operators.convert_ifelse(' '{pred}, {true_fn}, {false_fn}, {true_args}, {false_args}, {return_vars})'. format( pred=ast_to_source_code(pred), diff --git a/python/paddle/jit/dygraph_to_static/convert_operators.py b/python/paddle/jit/dygraph_to_static/convert_operators.py index 2b6f67212e53dc4e2e37b4d8a7d0f0bf81f16f57..d8ba9318074a422fe77d409022527bca18b1b68b 100644 --- a/python/paddle/jit/dygraph_to_static/convert_operators.py +++ b/python/paddle/jit/dygraph_to_static/convert_operators.py @@ -15,6 +15,7 @@ from __future__ import print_function from ...fluid.dygraph.dygraph_to_static.convert_operators import cast_bool_if_necessary #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_assert #DEFINE_ALIAS +from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_ifelse #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_len #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_logical_and #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_logical_not #DEFINE_ALIAS