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

1 Ansicht (letzte 30 Tage)
Mammo Image
Mammo Image am 20 Nov. 2017
Kommentiert: Bernhard Suhm am 11 Feb. 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 Kommentar
Bernhard Suhm
Bernhard Suhm am 11 Feb. 2018
If you were still interested in getting an answer, can you provide the code how you defined these layers?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Image Data Workflows finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by