- 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
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
ghada sandoub
el 29 de Jul. de 2020
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
Respuestas (1)
Ver también
Categorías
Más información sobre Deep Learning Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!