Main Content

Deep Learning Custom Layers

Define custom layers for deep learning

You can define your own custom deep learning layer for your problem. You can specify a custom loss function using a custom output layers and define custom layers with or without learnable parameters. After defining a custom layer, you can check that the layer is valid, GPU compatible, and outputs correctly defined gradients.

Functions

expand all

functionLayerFunction layer
checkLayerCheck validity of custom or function layer
setLearnRateFactorSet learn rate factor of layer learnable parameter
setL2FactorSet L2 regularization factor of layer learnable parameter
getLearnRateFactorGet learn rate factor of layer learnable parameter
getL2FactorGet L2 regularization factor of layer learnable parameter
findPlaceholderLayersFind placeholder layers in network architecture imported from Keras or ONNX
replaceLayerReplace layer in layer graph
assembleNetworkAssemble deep learning network from pretrained layers
PlaceholderLayerLayer replacing an unsupported Keras or ONNX layer, or unsupported functionality from functionToLayerGraph

Topics

Custom Layers Overview

Custom Intermediate Layers

Custom Output Layers

Network Composition and Nested Layers

Check Layer Validity