Contenuto principale

Addestramento personalizzato utilizzando la differenziazione automatica

Addestrare reti di Deep Learning utilizzando loop di addestramento personalizzati

Se la funzione trainingOptions non fornisce le opzioni di addestramento necessarie per l'attività o se è presente una funzione di perdita non supportata dalla funzione trainnet, è possibile definire un loop di addestramento personalizzato. Per i modelli che non possono essere specificati come reti di livelli, è possibile definire il modello come funzione. Per saperne di più, vedere Custom Training Loops.

Funzioni

espandi tutto

dlnetworkRete neurale di Deep Learning
imagePretrainedNetworkPretrained neural network for images (Da R2024a)
resnetNetwork2-D residual neural network (Da R2024a)
resnet3dNetwork3-D residual neural network (Da R2024a)
addLayersAdd layers to neural network
removeLayersRemove layers from neural network
replaceLayerReplace layer in neural network
connectLayersConnect layers in neural network
disconnectLayersDisconnect layers in neural network
addInputLayerAdd input layer to network (Da R2022b)
initializeInitialize learnable and state parameters of neural network
networkDataLayoutDeep learning network data layout for learnable parameter initialization (Da R2022b)
setL2FactorSet L2 regularization factor of layer learnable parameter
getL2FactorGet L2 regularization factor of layer learnable parameter
setLearnRateFactorSet learn rate factor of layer learnable parameter
getLearnRateFactorGet learn rate factor of layer learnable parameter
plotTracciare l'architettura della rete neurale
summaryStampare il riepilogo della rete (Da R2022b)
analyzeNetworkAnalyze deep learning network architecture
checkLayerCheck validity of custom or function layer
isequalCheck equality of neural networks
isequalnCheck equality of neural networks ignoring NaN values
forwardCompute deep learning network output for training
predictCompute deep learning network output for inference
adamupdateUpdate parameters using adaptive moment estimation (Adam)
rmspropupdate Update parameters using root mean squared propagation (RMSProp)
sgdmupdate Update parameters using stochastic gradient descent with momentum (SGDM)
lbfgsupdateUpdate parameters using limited-memory BFGS (L-BFGS) (Da R2023a)
lbfgsStateState of limited-memory BFGS (L-BFGS) solver (Da R2023a)
dlupdate Update parameters using custom function
trainingProgressMonitorMonitor and plot training progress for deep learning custom training loops (Da R2022b)
updateInfoUpdate information values for custom training loops (Da R2022b)
recordMetricsRecord metric values for custom training loops (Da R2022b)
groupSubPlotGroup metrics in training plot (Da R2022b)
exportPlotAsImageWrite training progress monitor to image file (Da R2026a)
padsequencesPad or truncate sequence data to same length
minibatchqueueCreate mini-batches for deep learning
onehotencodeEncode data labels into one-hot vectors
onehotdecodeDecode probability vectors into class labels
nextObtain next mini-batch of data from minibatchqueue
resetReset minibatchqueue to start of data
shuffleShuffle data in minibatchqueue
hasdataDetermine if minibatchqueue can return mini-batch
partitionPartition minibatchqueue
dlarrayDeep learning array for customization
dlgradientCompute gradients for custom training loops using automatic differentiation
dljacobianJacobian matrix deep learning operation (Da R2024b)
dldivergenceDivergence of deep learning data (Da R2024b)
dllaplacianLaplacian of deep learning data (Da R2024b)
dlfevalEvaluate deep learning model for custom training loops
dimsFormato dei dati dell'oggetto dlarray
finddimFind dimensions with specified label
stripdimsRemove dlarray data format
extractdataEstrae i dati da dlarray
isdlarrayCheck if object is dlarray
crossentropyCross-entropy loss for classification tasks
indexcrossentropyIndex cross-entropy loss for classification tasks (Da R2024b)
l1lossL1 loss for regression tasks (Da R2021b)
l2lossL2 loss for regression tasks (Da R2021b)
huberHuber loss for regression tasks
ctcConnectionist temporal classification (CTC) loss for unaligned sequence classification
mseHalf mean squared error
dlaccelerateAccelerate deep learning function
AcceleratedFunctionAccelerated deep learning function
clearCacheClear accelerated deep learning function trace cache

Argomenti

Personalizzazione dei loop di addestramento

Differenziazione automatica

Reti generative avversarie

Reti neurali a grafo

Accelerazione della funzione di Deep Learning

Informazioni complementari

Esempi in primo piano