Importing Googlenet into convolutional autoencoder
3 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
I wanted to initialize a convolutional autoencoder for a starfish image data set that I'm using with Googlenet's weights pre-classification step. So I made a convolutional autoencoder with layers that mimicked those of Googlenet for the first 57 layers, and initialized the weights and biases of the convolutional layers with Googlenet's weights and biases, e.g. CNN(6).Weights = net.Layers(6).Weights. I ended up with two errors. The first concerned depthConcatenationLayers; when I wrote depthConcatenationLayer(4), for instance, Matlab didn't know which layers to concatenate, and neither (from Googlenet's description) did I. The second concerned weight initializations of layers 14, 18, 23, and a bunch of other layers: I would get an error in training, saying that "Error using builtin. Array inputs must share the same number of channels." Help with either of these errors would be fantastic. Or, if you can suggest a better way of transporting Googlenet's weights into a new architecture than what I'm doing, that would also be much appreciated. (deepNetworkDesigner isn't recognized.)
Thanks.
0 件のコメント
回答 (2 件)
Zenin Easa Panthakkalakath
2018 年 9 月 27 日
depthConcatenationLayer(4) means that you can concatenate 4 layers to that point. If you look into the flow diagram mentioned here, right under 'Introduction', you should be able to see a few places where there are four lines pointing towards one layer. You need to use the 'connectLayers' function to point all of these to the same 'depthConcatenationLayer'. You have to specify which all layers you want to concatenate to that point. Have a look at the documentation so that you can have a better understanding:
Your second concern probably has to deal with the weights not being imported properly. The number of channels and weights assigned should be consistent.
By the way, MATLAB has a pre-trained implementation of GoogLeNet that you can use. You can find it here:
0 件のコメント
Bassem BEN CHEIKH
2020 年 4 月 14 日
Can you share your code for initializing the convolutional autoencoder?
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Data Workflows についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!