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

3 ビュー (過去 30 日間)
Yuto Imai
Yuto Imai 2023 年 9 月 14 日
回答済み: Karanjot 2023 年 9 月 21 日
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で使用するにはどのようにしたら良いのでしょうか。

回答 (1 件)

Karanjot
Karanjot 2023 年 9 月 21 日
こんにちは、ユウトさん よろしければ、この質問には英語でお答えします
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!

カテゴリ

Help Center および File Exchange製品のインストール についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!