enable_prim

paddle.incubate.autograd. enable_prim ( ) [source]

Note

ONLY available in the static graph mode.

Turns ON automatic differentiation mechanism based on automatic differential basic operators.

Examples

>>> import paddle
>>> from paddle.incubate.autograd import enable_prim, prim_enabled

>>> paddle.enable_static()
>>> enable_prim()

>>> print(prim_enabled())
True