Pretrained deep net (Vgg-F)
6 views (last 30 days)
Show older comments
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?
0 Comments
Answers (1)
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.
0 Comments
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!