disable_dygraph

paddle.fluid.disable_dygraph()[源代码]

该接口关闭动态图模式。

返回

代码示例

import paddle.fluid as fluid
import numpy as np
fluid.enable_dygraph()  # Now we are in dygraph mode
print(fluid.in_dygraph_mode())  # True
fluid.disable_dygraph()
print(fluid.in_dygraph_mode())  # False