The dag2dlnetwork function applies these adjustments to the input
network to make it compatible with dlnetwork functionality:
Remove the output layers — To specify the loss function when you train a neural
network, use the trainnet
function.
Replace fully connected layers with convolution layers — For neural networks that
require fully connected layers to output data with singleton spatial dimensions, the
dag2dlnetwork function replaces the fully connected layer with
the equivalent convolutional layer. Otherwise, the dag2dlnetwork
function does not replace the layer. In the output dlnetwork object,
the fully connected layer outputs data without spatial dimensions.
For networks that output singleton spatial dimensions, include a flatten layer —
For neural networks that output data with singleton spatial dimensions (for example, a
SqueezeNet neural network), the dag2dlnetwork function adds a
flatten layer at the end of network that removes the singleton spatial
dimensions.
Return an uninitialized network when they contains unsupported layers — If the
network contains layers that dlnetwork objects do not support, then
the function returns an uninitialized dlnetwork object. To remove or
replace unsupported layers in a dlnetwork object, use the removeLayers and replaceLayer functions, respectively.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.