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

1 Ansicht (letzte 30 Tage)
Yuto Imai
Yuto Imai am 14 Sep. 2023
Beantwortet: Karanjot am 21 Sep. 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で使用するにはどのようにしたら良いのでしょうか。

Antworten (1)

Karanjot
Karanjot am 21 Sep. 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!

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!