importCaffeLayers
Import convolutional neural network layers from Caffe
Description
imports the layers of a Caffe[1]network. The function returns the layers defined in thelayers
= ImportCaffelayers(protofile
)。prototxt
fileprotofile
。
This function requiresDeep Learning Toolbox™ Importer for Caffe Modelssupport package. If this support package is not installed, then the function provides a download link.
You can download pretrained networks from Caffe Model Zoo[2]。
Examples
输入参数
Output Arguments
More About
Tips
importCaffeLayers
can import networks with the following Caffe layer types, with some limitations:Caffe Layer Deep Learning Toolbox Layer BatchNormLayer
ConcatLayer
ConvolutionLayer
DeconvolutionLayer
DropoutLayer
EltwiseLayer
(only sum)EuclideanLossLayer
InnerProductLayer
InputLayer
LRNLayer
(Local Response Normalization)PoolingLayer
ReLULayer
ScaleLayer
SigmoidLayer
nnet.caffe.layer.SigmoidLayer
SoftmaxLayer
TanHLayer
If the network contains any other type of layer, then the software returns an error.
The function imports only the layers that
protofile
specifies with the include-phase TEST. The function ignores any layers thatprotofile
specifies with the include-phase TRAIN.MATLAB uses one-based indexing, whereas Python®uses zero-based indexing. In other words, the first element in an array has an index of 1 and 0 in MATLAB and Python, respectively. For more information on MATLAB indexing, seeArray Indexing。In MATLAB, to use an array of indices (
ind
) created in Python, convert the array toind+1
。
参考
[1]Caffe。https://caffe.berkeleyvision.org/。
[2]Caffe Model Zoo。https://caffe.berkeleyvision.org/model_zoo.html。