Convert deep learning model function to a layer graph
returns a layer graph based on the deep learning array function lgraph
= functionToLayerGraph(fun
,x
)fun
.
functionToLayerGraph
converts only those operations in
fun
that operate on dlarray
objects among the inputs
in x
. To include extra parameters or data in fun
, see
the topic Parameterizing Functions or the example Create Layer Graph from Function.
functionToLayerGraph
evaluates
fun
(x
) and traces the execution to derive an
equivalent layer graph, to the extent possible. The steps in
fun
(x
) that
functionToLayerGraph
can trace are both based on
dlarray
arguments and are supported calls for
dlarray
. See List of Functions with dlarray Support. For unsupported functions,
functionToLayerGraph
creates a PlaceholderLayer
.
specifies options using one or more name-value pair arguments in addition to the input
arguments in the previous syntax.lgraph
= functionToLayerGraph(fun
,x
,Name,Value
)
dlarray
| findPlaceholderLayers
| layerGraph
| PlaceholderLayer