Pretrained deep net (Vgg-F)

6 次查看(过去 30 天)
riad didou
riad didou 2022-9-16
回答: colordepth 2025-1-19
I have downloaded a pretrained model Vgg-F from the site (https://www.vlfeat.org/matconvnet/pretrained/)
When i try to pass my image without training i got the following error
net = load('imagenet-vgg-f.mat') ;
layer ='fc8'
feat = activations(net,img,layer,'OutputAs','columns');
Check for missing argument or incorrect argument data type in call to function 'activations'.
Error in (line 81)
feat = activations(net,img,layer,'OutputAs','columns');
Please how to solve the problem?

回答(1 个)

colordepth
colordepth 2025-1-19
The error you're encountering is because the network loaded is a struct, not a "SeriesNetwork" or "DAGNetwork" object, which the "activations" function requires. You can read more about the function by using the following command:
doc seriesnetwork.activations
To work with this network, please refer to the documentation for the MatConvNet toolbox at https://www.mathworks.com/matlabcentral/fileexchange/47811-vlfeat-matconvnet. The functions you need are "vl_simplenn_tidy" for initializing the neural network and "vl_simplenn" for running it on an image. These functions are provided in the toolbox.

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by