Supported Networks and Layers

Supported Pretrained Networks

GPU Coder™ supports code generation for series and directed acyclic graph (DAG) convolutional neural networks (CNNs or ConvNets). You can generate code for any trained convolutional neural network whose layers are supported for code generation. See Supported Layers. You can train a convolutional neural network on either a CPU, a GPU, or multiple GPUs by using the Deep Learning Toolbox™ or use one of the pretrained networks listed in the table and generate CUDA® code.

Network NameDescriptioncuDNNTensorRT
AlexNet

AlexNet convolutional neural network. For the pretrained AlexNet model, see alexnet.

YesYes
GoogLeNet

GoogLeNet convolutional neural network. For the pretrained GoogLeNet model, see googlenet.

YesYes
Caffe Network

Convolutional neural network models from Caffe. For importing a pretrained network from Caffe, see importCaffeNetwork.

YesYes
Inception-v3Inception-v3 convolutional neural network. For the pretrained Inception-v3 model, see inceptionv3.YesYes
ResNet

ResNet-50 and ResNet-101 convolutional neural networks. For the pretrained ResNet models, see resnet50 and resnet101.

YesYes
SegNet

Multi-class pixelwise segmentation network. For more information, see segnetLayers.

YesYes
SqueezeNet

Small deep neural network. For the pretrained ResNet models, see squeezenet.

YesNo
VGG-16

VGG-16 convolutional neural network. For the pretrained VGG-16 model, see vgg16.

YesYes
VGG-19

VGG-19 convolutional neural network. For the pretrained VGG-19 model, see vgg19.

YesYes

Supported Layers

The following layers are supported for code generation by GPU Coder for the target deep learning libraries specified in the table.

Once you install the support package GPU Coder Interface for Deep Learning Libraries, you can use coder.getDeepLearningLayers to see a list of the layers supported for a specific deep learning library. For example, coder.getDeepLearningLayers('cudnn') shows the list of layers supported for code generation by using the NVIDIA® cuDNN library.

Layer NameDescriptioncuDNNTensorRT
additionLayer

Addition layer

YesYes
averagePooling2dLayer

Average pooling layer

YesYes
batchNormalizationLayer

Batch normalization layer

YesYes
classificationLayer

Create classification output layer

YesYes
clippedReluLayer

Clipped Rectified Linear Unit (ReLU) layer

YesNo
convolution2dLayer

2-D convolution layer

YesYes
crop2dLayer

Layer that applies 2-D cropping to the input

YesYes
crossChannelNormalizationLayer

Channel-wise local response normalization layer

YesYes
depthConcatenationLayer

Depth concatenation layer

YesYes
dropoutLayer

Dropout layer

YesYes
fullyConnectedLayer

Fully connected layer

YesYes
imageInputLayer

Image input layer

YesYes
leakyReluLayer

Leaky Rectified Linear Unit (ReLU) layer

YesYes
maxPooling2dLayer

Max pooling layer

YesYes
maxUnpooling2dLayer

Max unpooling layer

YesYes
PixelClassificationLayer

Create pixel classification layer for semantic segmentation

YesYes
regressionLayer

Create a regression output layer

YesYes
reluLayer

Rectified Linear Unit (ReLU) layer

YesYes
softmaxLayer

Softmax layer

YesYes
transposedConv2dLayer

Create a transposed 2-D convolution layer

YesYes
YOLOv2OutputLayer

Create output layer for YOLO v2 object detection network

YesYes
YOLOv2ReorgLayer

Create reorganization layer for YOLO v2 object detection network

YesYes
YOLOv2TransformLayer

Create transform layer for YOLO v2 object detection network

YesYes
nnet.keras.layer.FlattenCStyleLayer

Flatten activations into 1-D assuming C-style (row-major) order.

YesYes
nnet.keras.layer.GlobalAveragePooling2dLayer

Global average pooling layer for spatial data.

YesYes
nnet.keras.layer.SigmoidLayer

Sigmoid activation layer.

YesYes
nnet.keras.layer.TanhLayer

Hyperbolic tangent activation layer.

YesYes
nnet.keras.layer.ZeroPadding2dLayer

Zero padding layer for 2-D input.

YesYes

Supported Classes

The following classes are supported for code generation by GPU Coder for the target deep learning libraries specified in the table.

Layer NameDescriptioncuDNNTensorRT
yolov2ObjectDetector

Detect objects using YOLO v2 object detector

  • Only the detect method of the yolov2ObjectDetector is supported for code generation.

  • The Roi argument to the detect method must be a codegen constant (coder.const()) and a 1x4 vector.

  • Only the Threshold, SelectStrongest, MinSize, and MaxSize Name-Value pairs are supported.

  • The labels output is returned as a cell array of character vectors, such as {'car','bus'}.

YesYes

See Also

Related Topics