ニューラルネットワークの層の値を取り出したい

5 visualizaciones (últimos 30 días)
shoki kobayashi
shoki kobayashi el 26 de Oct. de 2021
Respondida: Naoya el 29 de Oct. de 2021
現在LSTMを使用した分類でmatlabExampleにあるhttps://jp.mathworks.com/help/deeplearning/ug/sequence-to-sequence-classification-using-deep-learning.html
を動かしています。
その時にtest時のLSTMネットワークのsoftmaxに入る前にfully connectedで何が出力されているかを確認したいです。
どのようにすれば確認できるでしょうか

Respuestas (1)

Naoya
Naoya el 29 de Oct. de 2021
ネットワークの途中層の値を取得する場合は、activations関数を使います。
例題のネットワークが以下
>> net.Layers
ans =
次の層をもつ 5×1 の Layer 配列:
1 'sequenceinput' シーケンス入力 3 次元のシーケンス入力
2 'lstm' LSTM 200 隠れユニットのある LSTM
3 'fc' 全結合 5 全結合層
4 'softmax' ソフトマックス ソフトマックス
5 'classoutput' 分類出力 'Dancing' および 4 個のその他のクラスの crossentropyex
となり、 3番目のレイヤとなる全結合層時点の値を取得する場合は、
>> Y3 = activations(net,XTest{1},3);
で求めることができます。

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!