importCaffeNetwork
Import pretrained convolutional neural network models from Caffe
Description
imports a pretrained network from Caffe [1]. The
function returns the pretrained network with the architecture specified by the
net = importCaffeNetwork(protofile,datafile).prototxt file protofile and with network weights
specified by the .caffemodel file datafile.
This function requires Deep Learning Toolbox™ Importer for Caffe Models support package. If this support package is not installed, the function provides a download link.
You can download pretrained networks from Caffe Model Zoo [2].
returns a network with additional options specified by one or more
net = importCaffeNetwork(___,Name,Value)Name,Value pair arguments using any of the previous syntaxes.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
More About
Tips
importCaffeNetworkcan import networks with the following Caffe layer types, with some limitations:Caffe Layer Deep Learning Toolbox Layer BatchNormLayerConcatLayerConvolutionLayerDeconvolutionLayerDropoutLayerEltwiseLayer(only sum)EuclideanLossLayerInnerProductLayerInputLayerLRNLayer(Local Response Normalization)PoolingLayerReLULayerScaleLayerSigmoidLayernnet.caffe.layer.SigmoidLayerSoftmaxLayerTanHLayerIf the network contains any other type of layer, then the software returns an error.
The function imports only the layers that
protofilespecifies with the include-phase TEST. The function ignores any layers thatprotofilespecifies 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 about MATLAB indexing, see Array Indexing. In MATLAB, to use an array of indices (
ind) created in Python, convert the array toind+1.
References
[1] Caffe. https://caffe.berkeleyvision.org/.
[2] Caffe Model Zoo. https://caffe.berkeleyvision.org/model_zoo.html.