Pretrained deep net (Vgg-F)

6 views (last 30 days)
riad didou
riad didou on 16 Sep 2022
Answered: colordepth on 19 Jan 2025
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?

Answers (1)

colordepth
colordepth on 19 Jan 2025
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.

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!