How to feed matrix vector into a splitted pre-trained network
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Bernhard Suhm
el 11 de Feb. de 2018
If you were still interested in getting an answer, can you provide the code how you defined these layers?
Respuestas (0)
Ver también
Categorías
Más información sobre Image Data Workflows en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!