How to feed matrix vector into a splitted pre-trained network

1 vue (au cours des 30 derniers jours)
Mammo Image
Mammo Image le 20 Nov 2017
Commenté : Bernhard Suhm le 11 Fév 2018
I am using alexnet, you can see the structure of the network as following:
I used the activations function in Matlab to get the features from the output of conv5 layer. The output is a feature vector with a dimension 43264 for each single image (I have 14000 Images).
I did some processing on this output with no change in the dimension so it still 43264.
Then, I wanted to feed this matrix into the next layer which is MAX POOL3.
As you can notice in the structure of alexnet, the input of the pooling3 should be 13x13x256. So I changed the feature vector 14000X43264 to a cell array 14000x1 each cell has 13x13x256.
I used the following code to train the network:
net = trainNetwork (Data, Datalabels, Layers, trainingOptions)
I still has an error saying unexpected input to Pooling layer! as following:
Error using nnet.internal.cnn.layer.util.inferParameters>iInferSize (line 86) The output of layer 1 is incompatible with the input expected by layer 2.
Any I idea please?
Thanks in advance
  1 commentaire
Bernhard Suhm
Bernhard Suhm le 11 Fév 2018
If you were still interested in getting an answer, can you provide the code how you defined these layers?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by