class paddle.fluid.dygraph.dygraph_to_static.return_transformer. ReturnTransformer ( wrapper_root ) [source]

Transforms return statements into equivalent python statements containing only one return statement at last. The basics idea is using a return value variable to store the early return statements and boolean states with if-else to skip the statements after the return.

generic_visit ( node )

Called if no explicit visitor function exists for a node.

visit ( node )

Self-defined visit for appending ancestor