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

조회 수: 1 (최근 30일)
Mammo Image
Mammo Image 2017년 11월 20일
댓글: Bernhard Suhm 2018년 2월 11일
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
Bernhard Suhm
Bernhard Suhm 2018년 2월 11일
If you were still interested in getting an answer, can you provide the code how you defined these layers?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by