assembleNetwork - (Not recommended) Assemble deep learning network from pretrained layers - MATLAB (original) (raw)

assembleNetwork is not recommended. Use dlnetwork objects instead.

The assembleNetwork function returns SeriesNetwork and DAGNetwork objects, which are not recommended. There are no plans to remove support for the assembleNetwork function. However,dlnetwork objects are recommended instead and have these advantages:

To update your code to use dlnetwork objects, use one of these options:

Not Recommended Recommended
Assemble SeriesNetwork or DAGNetwork object using a layer array or layer graph. Build dlnetwork object directly and do not include any output layers. Most functions that supportLayerGraph objects also support dlnetwork objects. To initialize the network, use the initialize function.
Assemble imported network returned by theimportKerasLayers,importTensorFlowLayers, orimportONNXLayers functions. Import the network using the importNetworkFromTensorFlow or importNetworkFromONNX functions.