Importing Googlenet into convolutional autoencoder

조회 수: 2 (최근 30일)
smarzen
smarzen 2018년 9월 18일
답변: Bassem BEN CHEIKH 2020년 4월 14일
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.

답변 (2개)

Zenin Easa Panthakkalakath
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:

Bassem BEN CHEIKH
Bassem BEN CHEIKH 2020년 4월 14일
Can you share your code for initializing the convolutional autoencoder?

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by