Custom Layer Learnable Parameters Initialization.

3 visualizaciones (últimos 30 días)
David Ernesto Caro
David Ernesto Caro el 8 de Mzo. de 2020
Comentada: Jose Cortes-Briones el 16 de En. de 2023
Hi!
I created a Custom Layer with Learnable Parameters (https://www.mathworks.com/help/deeplearning/ug/define-custom-deep-learning-layer.html)
However, to initialize these parameters I need to know the outputsize of the previous layer. I noticed that some pre-defined layers such as FullyConnected automaticly initialize its own weights using information from previous layers. Is there a way to automatize the weights initialization on custom layers at network initialization?
David
  1 comentario
Jose Cortes-Briones
Jose Cortes-Briones el 9 de Sept. de 2020
I asked a similar question a while ago and never got a response :/

Iniciar sesión para comentar.

Respuesta aceptada

Joss Knight
Joss Knight el 16 de En. de 2023

Más respuestas (1)

John Smith
John Smith el 4 de Oct. de 2021
Unfortunately, at least as of version 2021a, Matlab doesn't provide staright forward capabilities to automatically initialize learnable parameters of a custom layer similar to its built-in layers.
There's a workaround though using a shadow built-in network nested inside your custom layer (see here). Matlab will automatically initialize this layer from which learnable parameters you can pick up the values that you need.
It's a kludge, but it works (I've implemented such a scheme myself.

Categorías

Más información sobre Image Data Workflows en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by