- the first step after installing the Caffe package is to download the required support package by typing importCaffeLayers at the command line. however, when I typed this command at the command line , I have the following error:
help on import caffe network
3 次查看(过去 30 天)
显示 更早的评论
Problem:
I am trying to import a caffe network (https://github.com/WHUQZhang/PSTCR/blob/master/Def/Model.prototxt) to matlab and got the following error:
>> importCaffeLayers('model.prototxt')
Error using nnet.internal.cnn.caffe.CaffeModelReader/makeAdditionLayer (line 1295)
The layer 'anti_mask' specifies an unsupported element-wise operation. Only addition is supported.
Error in nnet.internal.cnn.caffe.CaffeModelReader/importLayers (line 287)
layers(layerIdx) = makeAdditionLayer(this, origLayerIdxInFile);
Error in importCaffeLayers (line 73)
layers = importLayers(readerObj);
Question:
I learnt deep learning via matlab and have no knowledge about caffe at all. But it seems that the problem is caused by the last layer of the caffe model:
layer {
name: "anti_mask"
type: "Eltwise"
bottom: "conv11"
bottom: "data_3"
top: "anti_mask"
eltwise_param {
operation: PROD
}
}
It seems to me that the above layer is to do a pixel-wise multiplication. I assume that Matlab should be able to easily support that. Would you please help how to get around this issue?
1 个评论
ghada sandoub
2020-7-29
Hi Qi Chen,
I hope that you find a solution to your problem. I have the same problem of having no experience in using caffe on Matlab. I have my own convolutional neural network and I want to train the network using Caffe package in Matlab R2018a. I installed the importer for Caffe models in Matlab. I used the following link to guide me how to start using caffe model to train my network step by step https://www.mathworks.com/help/deeplearning/ref/importcaffelayers.html . however I have some questions:
>> importCaffeLayers
Not enough input arguments.
Error in importCaffeLayers (line 71)
params = nnet.internal.cnn.caffe.CaffeModelReader.parseImportLayers(protofile, varargin{:});
Did you know what does this error mean? and how to fix it?
2. To import the layers of Caffe network I should use the following commands:
Specify the example file 'digitsnet.prototxt' to import.
protofile = 'digitsnet.prototxt';
layers = importCaffeLayers(protofile)
Can you help me on how to prepare the .prototxt file protofile that defines the network layers?
Any help will be appreciated
回答(1 个)
另请参阅
类别
在 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!