Capas personalizadas
Defina capas personalizadas de deep learning
Para la mayor parte de las tareas, puede usar capas integradas. Si no hay una capa integrada que necesita para la tarea, puede definir su propia capa personalizada. Puede especificar una función de pérdida personalizada usando una capa de salida personalizada y definir capas personalizadas con parámetros que se puedan aprender y de estado. Después de definir una capa personalizada, puede comprobar que es válida y compatible con la GPU, y que devuelve como salida gradientes correctamente definidos. Para obtener una lista de capas compatibles, consulte Lista de capas de deep learning.
Funciones
Temas
Visión general de las capas personalizadas
- Define Custom Deep Learning Layers
Learn how to define custom deep learning layers. - Define Custom Deep Learning Intermediate Layers
Learn how to define custom deep learning intermediate layers. - Define Custom Deep Learning Output Layers
Learn how to define custom deep learning output layers. - Check Custom Layer Validity
Learn how to check the validity of custom deep learning layers. - Import Custom Layer into Deep Network Designer
This example shows how to import a custom classification output layer with the sum of squares error (SSE) loss and add it to a pretrained network in Deep Network Designer. - Assemble Network from Pretrained Keras Layers
This example shows how to import the layers from a pretrained Keras network, replace the unsupported layers with custom layers, and assemble the layers into a network ready for prediction. - Replace Unsupported Keras Layer with Function Layer
This example shows how to import the layers from a pretrained Keras network, replace the unsupported layers with function layers, and assemble the layers into a network ready for prediction.
Capas intermedias personalizadas
- Define Custom Deep Learning Layer with Learnable Parameters
This example shows how to define a PReLU layer and use it in a convolutional neural network. - Define Custom Deep Learning Layer with Multiple Inputs
This example shows how to define a custom weighted addition layer and use it in a convolutional neural network. - Define Custom Deep Learning Layer with Formatted Inputs
This example shows how to define a custom layer with formatteddlarray
inputs. - Define Custom Recurrent Deep Learning Layer
This example shows how to define a peephole LSTM layer and use it in a neural network. - Specify Custom Layer Backward Function
This example shows how to define a PReLU layer and specify a custom backward function. - Custom Layer Function Acceleration
Accelerate custom layer forward and predict functions by caching and reusing traces. - Define Custom Deep Learning Layer for Code Generation
This example shows how to define a PReLU layer that supports code generation.
Capas de salida personalizadas
- Define Custom Classification Output Layer
This example shows how to define a custom classification output layer with sum of squares error (SSE) loss and use it in a convolutional neural network. - Define Custom Regression Output Layer
This example shows how to define a custom regression output layer with mean absolute error (MAE) loss and use it in a convolutional neural network. - Specify Custom Output Layer Backward Loss Function
This example shows how to define a custom classification output layer with sum of squares error (SSE) loss and specify a custom backward loss function.
Composición de la red y capas anidadas
- Deep Learning Network Composition
Define custom layers containing layer graphs. - Define Nested Deep Learning Layer
This example shows how to define a nested deep learning layer. - Train Deep Learning Network with Nested Layers
This example shows how to train a network with nested layers.