How can I use sigmoid layer at output for multilabel classification?

11 ビュー (過去 30 日間)
Yeon Hwee Bae
Yeon Hwee Bae 2020 年 9 月 25 日
コメント済み: Firas Abou Dalla 2021 年 11 月 25 日
layers = [ ...
sequenceInputLayer(11890)
bilstmLayer(100,'OutputMode','last')
fullyConnectedLayer(60)
sigmoidLayer
weightedClassificationLayer(classWeights)
]
I tried to use sigmoid activation function at output node for multilable classification, but it says "softmaxlayer is left out" whether classificationLayer is custom or not.
how to use sigmoid layer at output for classification?
  2 件のコメント
Ankit Pasi
Ankit Pasi 2021 年 5 月 15 日
Hi,
Did you end up solving your issue? I have a similar problem where the network graph does not accept sigmoid as the final layer and throws random errors. Useless actually compared to pytorch and tensorflow..
Firas Abou Dalla
Firas Abou Dalla 2021 年 11 月 25 日
Did you solve this problem?

サインインしてコメントする。

回答 (1 件)

Pratyush Roy
Pratyush Roy 2020 年 9 月 29 日
The following link might be helpful:
sigmoidLayer has been introduced in MATLAB 2020b. The link to the documentation is given below:
  1 件のコメント
Tobe freeman
Tobe freeman 2021 年 6 月 19 日
Thanks for these links, they were a useful step foward.
But I was not able to get too much further with them. The link to sigmoidLayer contains the following Tip:
"...To use the sigmoid layer for binary or multilabel classification problems, create a custom binary cross-entropy loss output layer or use a custom training loop.
>> Create a custom binary cross-entropy loss output layer or use a custom training loop
How? Also, keep in mind that if an expert provides you with a choice between two options they are likely signalling that neither of them actually work. But I digress.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by