functionLayerの引数にsequenceInputLayerの引数を用いるにはどうしたら良いですか
조회 수: 1 (최근 30일)
이전 댓글 표시
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で使用するにはどのようにしたら良いのでしょうか。
댓글 수: 0
답변 (1개)
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!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!