Created by: liym27
PR types: New features
PR changes: dygraph to static graph
Describe:
1. Fix bug: Create logic node recursively in LogicalOpTransformer.
convert_XX
to run the transformed code dynamically. Which means,
2. Add functions - All while stmts and logical stmts are transformed whether it depends on
Tensor
or not; - But in run-time, the code will be run in different ways (1) run paddle op like
while_loop
; (2) run python while. How it runs depends on whether it depends onTensor
.
This method will not use static variable types while transforming ast node, because the variable types got from static analysis are often inaccurate.
convert_while_loop
: A function representation of a Python while
statement.
convert_logical_and
: A function representation of a Python and
statement.
convert_logical_or
: A function representation of a Python or
statement.
convert_logical_not
: A function representation of a Python not
statement.
Related PR : convert_ifelse: https://github.com/PaddlePaddle/Paddle/pull/24866