convert_to_static

paddle.fluid.dygraph.dygraph_to_static.program_translator. convert_to_static ( function ) [source]

Transforms function of dygraph into static function using the cache mechanism.

Parameters

function (callable) – The function with dygraph layers that will be converted into static layers.