No appropriate method, property, or field 'blobs' for class 'SeriesNetwork'
Show older comments
I am getting error No appropriate method, property, or field 'blobs' for class 'SeriesNetwork' when I execute this instruction data = net.blobs('conv5').get_data();. Could you help me please?
13 Comments
Walter Roberson
on 4 Feb 2018
What leads you to expect that you should be able to do that operation ?
Tripoli Settou
on 4 Feb 2018
Walter Roberson
on 4 Feb 2018
SeriesNetwork have a 'Layers' property: is that what you were looking for instead of 'blobs' ?
Tripoli Settou
on 4 Feb 2018
Walter Roberson
on 4 Feb 2018
where did you find that some people use that? I want to look at the context.
Tripoli Settou
on 4 Feb 2018
Edited: Walter Roberson
on 4 Feb 2018
Walter Roberson
on 4 Feb 2018
"Caffe" is a key point here.
In Caffee, blobs are memory arrays holding data for communication with the CPU and GPU algorithms; see http://caffe.berkeleyvision.org/tutorial/net_layer_blob.html
Neural Networks in MATLAB do not use blobs: they use objects (or structs) that have properties, many of which are cell arrays holding relevant information. The SeriesNetwork you getting the error for is a MATLAB object that is represented without using blobs.
net.forward appears to be part of MatCaffe, described at http://caffe.berkeleyvision.org/tutorial/interfaces.html . That is a third party product that the active volunteers here do not appear to use much. Possibly something has gone wrong with your installation of that product. What shows up for
which net.forward
which net.blobs
Question for you: are you sure that get_Image_Path is returning the image in the BGR order that caffe needs? https://ahmedibrahimvt.wordpress.com/2016/04/18/caffe-in-matlab-matcaffe-simple-tutorial/ This would not affect your ability to find net.blobs, but when you solve the net.blobs problem then order of the color channels is something you will need to check.
Tripoli Settou
on 5 Feb 2018
Walter Roberson
on 5 Feb 2018
MATLAB does not provide any built-in functions to get the layers of a Caffe object. MatCaffe should provide those functions.
If you are referring to MATLAB convolution networks, then index the Layers property of the SeriesNetwork object with the layer number.
Tripoli Settou
on 5 Feb 2018
Edited: Walter Roberson
on 5 Feb 2018
Walter Roberson
on 5 Feb 2018
When you were asking about blobs before, that was a request to extract the properties of the layer you were interested in -- things like the weights. That is a different task than extracting the output when the network is applied to particular data. Since layer 5 is the last layer, the output of layer 5 is just the same as the output of the network itself when applied for any particular purpose, whereas activations would give you the features matrix after training, which is not something you had previously asked for.
The closest to what you had asked for before would be
net.Layers(5)
Tripoli Settou
on 6 Feb 2018
Walter Roberson
on 6 Feb 2018
It does appear that activations() can return the feature outputs for a given layer. See also https://www.mathworks.com/help/nnet/examples/visualize-features-of-a-convolutional-neural-network.html
Answers (0)
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!