How to use VGG-S and how to extract output features by it?
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi everyone,
In deep learning there are many model of convolution neural network CNN. To try VGG-S model, I download "imagenet-vgg-s.mat" from here and I try it by this code to extract the output feature from 2nd fully connected layer:
net = load('./Model/imagenet-vgg-s.mat');
layer = net.layers{1,18}.name;
outputFeatures = activations(net,Img,layer);
but this error shown:
_ *Undefined function 'activations' for input arguments of type 'struct'.
Error in Project (line 31)
outputFeatures = activations(net,Img,layer);*_
So I download prototxt and caffe model of it "VGG_CNN_S.caffemodel" and "VGG_CNN_S_deploy.prototxt" from this link here . I try it by this code
protofile = './model/ VGG_CNN_S_deploy.prototxt ';
datafile = './model/ VGG_CNN_S.caffemodel ';
net = importCaffeNetwork(protofile, datafile);
but this error is shown:
* _Error using
nnet.internal.cnn.caffe.CaffeModelReader/checkIfPoolingLayerOutputSizeMatchesCaffe
(line 1081)
The pooling layer 'pool1' is not compatible with MATLAB. Caffe computes the output
size as [37 37 96] but MATLAB computes it as [36 36 96].
Error in nnet.internal.cnn.caffe.CaffeModelReader/makePoolingLayer (line 928)
checkIfPoolingLayerOutputSizeMatchesCaffe(this, inputSize, internalLayer);
Error in nnet.internal.cnn.caffe.CaffeModelReader/importLayers (line 257)
[layers(layerIdx), internalLayer, outputSize] =
makePoolingLayer(this, origLayerIdxInFile, outputSize);
Error in nnet.internal.cnn.caffe.CaffeModelReader/importSeriesNetwork (line 310)
layers = importLayers(this);
Error in importCaffeNetwork (line 82)
network = importSeriesNetwork(readerObj);_*
Could you help me how to use VGG-S and how to extract output features by it?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!