Custom Layer Learnable Parameters Initialization.
4 ビュー (過去 30 日間)
David Ernesto Caro 2020 年 3 月 8 日
コメント済み: Jose Cortes-Briones 2023 年 1 月 16 日
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?
Jose Cortes-Briones 2020 年 9 月 9 日
I asked a similar question a while ago and never got a response :/
Joss Knight 2023 年 1 月 16 日
This is now supported via the optional method initialize: https://www-integ2.mathworks.com/help/deeplearning/ug/define-custom-deep-learning-intermediate-layers.html#mw_87362c7c-37d3-40c2-b5c8-c45ded304bcb
その他の回答 (1 件)
John Smith 2021 年 10 月 4 日
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.
Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!