How to reuse activations of two concatenated layers into a new one

2 ビュー (過去 30 日間)
Ben Hur
Ben Hur 2017 年 11 月 15 日
コメント済み: Kenta 2020 年 3 月 29 日
I have two streams pre-trained networks (alexnet), I got the activations from the conv5 layer (for the two stream), then, concatenate the training feature for each stream and also the testing features as a mat file. the dimension of the output of the conv5 is 18462x43682 which will be 18462x87364.
Now I just want to feed the concatenated features into new layers ending with fully connected and classification layer.
1- should I use a new network and feed the concatenated features as an input. or using one of the old networks? 2- how to get the activations which have huge dimension after concatenation to the next layer?
Many Thanks
  7 件のコメント
Meiyan Huang
Meiyan Huang 2018 年 3 月 5 日
I have the same problem. Do you solve it? If so, could you please tell me? Many thanks!
Kenta
Kenta 2020 年 3 月 29 日

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

採用された回答

Bernhard Suhm
Bernhard Suhm 2018 年 1 月 10 日
1) If you have R2017b, there is support for DAG networks. You'd extract the layers from the networks using the “Layers” property. Then you would created a “LayerGraph” object using the “layerGraph” function, add the layers with the “addLayers” function, and use “connectLayers” to add any new connections.
2) To clarify, are the dimensions of 18462x87364 the output of “activations”. In 2017b and earlier, the default output of activations is NumObs-by-featureDims. This implies that 18,462 is the number of observations. So if you create a DAGNetwork like described above, you can reduce ‘MiniBatchSize’ to split those 18,462 observations into a series of batches that will be processed one by one to keep memory usage low. Let me know if that assumption wasn't correct.
Yes, looks like you are out of software maintenance (account "off" in your terms), or else tech support would have picked up your question a long time ago. If you are current on your maintenance, reach out to tech support to validate that you are eligible for support, and ask your questions that way. This forum is not watched closely - I am making an attempt to catch up, but there is no guarantee for fast turn around on MATLAB answers.
  1 件のコメント
Meiyan Huang
Meiyan Huang 2018 年 3 月 5 日
I followed the suggestions as you mentioned above. However, there was something wrong when I connected multi-inputs into the network (two sets of data for two streams pre-trained alexnet respectively, then concatenate the training feature for each stream). There were "Layer graphs can contain only one input layer." appeared on the Matlab. Could you please tell me how to add multi-inputs into the network? Many thanks!

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

その他の回答 (0 件)

カテゴリ

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