Contenido principal

Supported Layers for C Code Generation of Quantized Networks

R2026b

The layers in a quantized neural network that are supported for C code generation depend on the choice of code generation workflow.

To generate C code for a quantized network, use one of these approaches.

Input Layers

Layercodegen and Deep Learning Network Blocks WorkflowsDeep Learning Layers Blocks Workflow
imageInputLayer
sequenceInputLayer
featureInputLayer

Convolution and Fully Connected Layers

Layercodegen and Deep Learning Network Blocks WorkflowsDeep Learning Layers Blocks Workflow
convolution1dLayer
convolution2dLayer
groupedConvolution2dLayer
fullyConnectedLayer

Recurrent Layers

Layercodegen and Deep Learning Network Blocks WorkflowsDeep Learning Layers Blocks Workflow
lstmLayer
gruLayer
lstmProjectedLayer
gruProjectedLayer 

Activation Layers

Layercodegen and Deep Learning Network Blocks WorkflowsDeep Learning Layers Blocks Workflow
reluLayer
leakyReluLayer
preluLayer
clippedReluLayer
tanhLayer
softmaxLayer
sigmoidLayer

Normalization Layers

Layercodegen and Deep Learning Network Blocks WorkflowsDeep Learning Layers Blocks Workflow
batchNormalizationLayer

Utility Layers

Layercodegen and Deep Learning Network Blocks WorkflowsDeep Learning Layers Blocks Workflow
dropoutLayer
spatialDropoutLayer
flattenLayer
scalingLayer
identityLayer
reshapeLayer
permuteLayer
sliceLayer 
formatLayer
depthToSpace2dLayer (Image Processing Toolbox)
spaceToDepthLayer (Image Processing Toolbox)

Note

The identityLayer, dropoutLayer, and spatialDropoutLayer layers can be quantized if you use the prepareNetwork function during the quantization workflow. For more information, see Considerations for Supported Layers for Quantization.

Combination Layers

Layercodegen and Deep Learning Network Blocks WorkflowsDeep Learning Layers Blocks Workflow
additionLayer
multiplicationLayer
concatenationLayer
depthConcatenationLayer

See Also

|

Topics