Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

图像深度学习

从头开始训练卷积神经网络或使用预训练的网络快速学习新任务

您可以通过定义网络架构并从头开始训练网络,来创建新的用于图像分类和回归任务的深度网络。您还可以使用迁移学习以利用预训练网络所提供的知识来学习新数据中的新模式。通常来说,使用迁移学习对预训练的图像分类网络进行微调比从头开始训练更快更容易。使用预训练的深度网络,您可以快速学习新任务,而无需定义和训练新网络,也不需要使用数百万个图像或强大的 GPU。

定义网络架构后,必须使用 trainingOptions 函数定义训练参数。然后,您可以使用 trainNetwork 训练网络。使用经过训练的网络预测类标签或数值响应。

您可以在一个 CPU、一个 GPU、多个 CPU 或 GPU 上训练卷积神经网络,或者在集群中并行训练或在云中训练。在 GPU 上训练或并行训练需要 Parallel Computing Toolbox™。使用 GPU 需要支持的 GPU 设备(有关受支持设备的信息,请参阅GPU Computing Requirements (Parallel Computing Toolbox))。使用 trainingOptions 函数指定执行环境。

App

深度网络设计器设计、可视化和训练深度学习网络

函数

全部展开

trainingOptionsOptions for training deep learning neural network
trainNetworkTrain deep learning neural network
analyzeNetworkAnalyze deep learning network architecture
squeezenetSqueezeNet convolutional neural network
googlenetGoogLeNet convolutional neural network
inceptionv3Inception-v3 convolutional neural network
densenet201DenseNet-201 convolutional neural network
mobilenetv2MobileNet-v2 convolutional neural network
resnet18ResNet-18 convolutional neural network
resnet50ResNet-50 convolutional neural network
resnet101ResNet-101 convolutional neural network
xceptionXception convolutional neural network
inceptionresnetv2Pretrained Inception-ResNet-v2 convolutional neural network
nasnetlargePretrained NASNet-Large convolutional neural network
nasnetmobilePretrained NASNet-Mobile convolutional neural network
shufflenetPretrained ShuffleNet convolutional neural network
darknet19DarkNet-19 convolutional neural network
darknet53DarkNet-53 convolutional neural network
efficientnetb0EfficientNet-b0 convolutional neural network
alexnetAlexNet convolutional neural network
vgg16VGG-16 convolutional neural network
vgg19VGG-19 convolutional neural network

输入层

imageInputLayerImage input layer
image3dInputLayer3-D image input layer
featureInputLayerFeature input layer

卷积和全连接层

convolution2dLayer2-D convolutional layer
convolution3dLayer3-D convolutional layer
groupedConvolution2dLayer2-D grouped convolutional layer
transposedConv2dLayerTransposed 2-D convolution layer
transposedConv3dLayerTransposed 3-D convolution layer
fullyConnectedLayerFully connected layer

激活层

reluLayerRectified Linear Unit (ReLU) layer
leakyReluLayerLeaky Rectified Linear Unit (ReLU) layer
clippedReluLayerClipped Rectified Linear Unit (ReLU) layer
eluLayerExponential linear unit (ELU) layer
tanhLayerHyperbolic tangent (tanh) layer
swishLayerSwish layer
functionLayerFunction layer

归一化、丢弃和裁剪层

batchNormalizationLayerBatch normalization layer
groupNormalizationLayerGroup normalization layer
instanceNormalizationLayerInstance normalization layer
layerNormalizationLayerLayer normalization layer
crossChannelNormalizationLayer Channel-wise local response normalization layer
dropoutLayerDropout layer
crop2dLayer2-D crop layer
crop3dLayer3-D crop layer

池化和去池化层

averagePooling2dLayerAverage pooling layer
averagePooling3dLayer3-D average pooling layer
globalAveragePooling2dLayer2-D global average pooling layer
globalAveragePooling3dLayer3-D global average pooling layer
globalMaxPooling2dLayerGlobal max pooling layer
globalMaxPooling3dLayer3-D global max pooling layer
maxPooling2dLayerMax pooling layer
maxPooling3dLayer3-D max pooling layer
maxUnpooling2dLayerMax unpooling layer

组合层

additionLayerAddition layer
multiplicationLayerMultiplication layer
concatenationLayerConcatenation layer
depthConcatenationLayerDepth concatenation layer

输出层

sigmoidLayerSigmoid layer
softmaxLayerSoftmax 层
classificationLayerClassification output layer
regressionLayer创建回归输出层
augmentedImageDatastoreTransform batches to augment image data
imageDataAugmenterConfigure image data augmentation
augmentApply identical random transformations to multiple images
layerGraphGraph of network layers for deep learning
plotPlot neural network architecture
addLayersAdd layers to layer graph or network
removeLayersRemove layers from layer graph or network
replaceLayerReplace layer in layer graph or network
connectLayersConnect layers in layer graph or network
disconnectLayersDisconnect layers in layer graph or network
DAGNetworkDirected acyclic graph (DAG) network for deep learning
resnetLayersCreate 2-D residual network
resnet3dLayersCreate 3-D residual network
isequalCheck equality of deep learning layer graphs or networks
isequalnCheck equality of deep learning layer graphs or networks ignoring NaN values
classifyClassify data using trained deep learning neural network
predictPredict responses using trained deep learning neural network
activations计算深度学习网络层激活
confusionchartCreate confusion matrix chart for classification problem
sortClassesSort classes of confusion matrix chart

模块

全部展开

PredictPredict responses using a trained deep learning neural network
Image Classifier使用经过训练的深度学习神经网络对数据进行分类

属性

ConfusionMatrixChart PropertiesConfusion matrix chart appearance and behavior

示例和操作指南

使用预训练网络

创建新的深度网络

概念