現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
No appropriate method, property, or field 'blobs' for class 'SeriesNetwork'
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
Walter Roberson
2018 年 2 月 4 日
What leads you to expect that you should be able to do that operation ?
Tripoli Settou
2018 年 2 月 4 日
I need it to get the data from last convolution layer (ex: Conv5)in Convolutional Neural Networks (CNN)
Walter Roberson
2018 年 2 月 4 日
SeriesNetwork have a 'Layers' property: is that what you were looking for instead of 'blobs' ?
Tripoli Settou
2018 年 2 月 4 日
I want to get the output of last convolution layer in CNN, so I found some people use this instruction : data = net.blobs('conv5').get_data();
But when I try it, this error appears: No appropriate method, property, or field 'blobs' for class 'SeriesNetwork
Walter Roberson
2018 年 2 月 4 日
where did you find that some people use that? I want to look at the context.
Tripoli Settou
2018 年 2 月 4 日
編集済み: Walter Roberson
2018 年 2 月 4 日
As I said previously I want to get the output data from the last convolution layer in CNN .. So to do that i found some people use this instruction with Caffe library.. this is the code
feats=[];
for i=1: Number of images
Img = get_Image_path(i); % get image from dataset images
Img= imresize(Img,[224,224]);
image{1}=Img;
score=net.forward(image);
score = score{1};
data = net.blobs('conv5_3').get_data();
data = reshape(data, 14*14, 512);
feats(:,:,i) = data; % this the output data of the last conv layer (conv5_3)
end
Could you help me to get the output data of the last layer?! Can i get it without caffe library? All the best
Walter Roberson
2018 年 2 月 4 日
"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
2018 年 2 月 5 日
Thank you for your reply and important links but I want to know is there another way to get a data from conv layers of CNN using Matlab built-in function ?!
Walter Roberson
2018 年 2 月 5 日
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
2018 年 2 月 5 日
編集済み: Walter Roberson
2018 年 2 月 5 日
Thank you very much,
yes i'm referring to MATLAB convolution networks also i try to extract the outputs of conv layer without caffe by using "activations" function in this code:
net = alexnet;
channels = 1:256;
Mat_Features = [];
NbrImg = 1000 % Number of images in Dataset
for i = 1: NbrImg
I = readimage(Dataset,i);
I = imresize(I,[227,227]);
Features_Map_Cv5 = activations(net,I,'conv5','OutputAs','channels');%Get the output data from last convlayer (5th conv layer in AlexNet)
Feat = reshape(Features_Map_Cv5,13*13,256);
Mat_Features = [Mat_Features ; Feat];
end
- What's your opinion about my code, is it correct?!*
Walter Roberson
2018 年 2 月 5 日
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
2018 年 2 月 6 日
I want to know how can i get features "output data" of each layer. Is "activations" function can do that?? when I search, I find some people use blobs in caffe /Matlab to get features of each layer, so i want to get this features without using blobs/caffe.
Walter Roberson
2018 年 2 月 6 日
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
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Data Workflows についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
アジア太平洋地域
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)