help on import caffe network

2 visualizaciones (últimos 30 días)
Qi Chen
Qi Chen el 3 de Abr. de 2020
Comentada: ghada sandoub el 29 de Jul. de 2020
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
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:
  1. 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:
>> 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

Iniciar sesión para comentar.

Respuestas (1)

Qi Chen
Qi Chen el 3 de Abr. de 2020
The question of lacking a multiplication layer in Matlab was raised more than 1 year ago. I will be very surprised that such a layer still does not exist in Matlab 2020a.

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by