functionLa​yerの引数にseq​uenceInput​Layerの引数を用​いるにはどうしたら良​いですか

3 visualizaciones (últimos 30 días)
Yuto Imai
Yuto Imai el 14 de Sept. de 2023
Respondida: Karanjot el 21 de Sept. de 2023
10,000行4列(いま各列のラベルを'A'から'D'とします)の入力データを用いて教師あり深層学習を行たいと思います。
そこで、以下のlayerを考えています:
layers = [
sequenceInputLayer(8,"Name","sequence")
fullyConnectedLayer(50,"Name","fc_1")
softplusLayer("Name","softplus_1")
fullyConnectedLayer(50,"Name","fc_fun")
functionLayer(@(X) X./(1 + A .* abs(X)),Description="mSoftsign")
fullyConnectedLayer(50,"Name","fc_2")
softplusLayer("Name","softplus_2")
regressionLayer("Name","regressionoutput")];
functionLayerで独自のactivation functionとして、sequenceInputLayerの第一引数("A")を使用したいと考えています。
このように、InputLayerの出力をfunctionLayerで使用するにはどのようにしたら良いのでしょうか。

Respuestas (1)

Karanjot
Karanjot el 21 de Sept. de 2023
こんにちは、ユウトさん よろしければ、この質問には英語でお答えします
I understand that you would like to use the first argument ("A") of sequenceInputLayer as a unique activation function in functionLayer.
You may define a custom activation function which takes the input and applies the desired operation using the first column ('A') of the input. The output of this custom activation function is then used in the functionLayer as the unique activation function.
To learn more about this, please refer to the below documentation to implement a custom deep learning layer:
I hope this helps!

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!