Capas personalizadas de deep learning
Defina capas personalizadas de deep learning
Puede definir su propia capa de deep learning personalizada para su problema. Puede especificar una función de pérdida personalizada usando capas de salida personalizadas y definir capas personalizadas con parámetros que se puedan aprender o sin ellos. 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.
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.
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. - 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 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.
Comprobar la validez de las capas
- Check Custom Layer Validity
Learn how to check the validity of custom deep learning layers.