Caffe Support
Caffe is a deep learning framework developed by Berkeley AI Research (BAIR) and by community contributors.
Each version of the Intel® Movidius™ Neural Compute SDK (Intel® Movidius™ NCSDK) installs and is validated with a single version of Caffe that provides broad network support for that release. The specific version installed may change from release to release. Other versions of Caffe may work with the NCSDK but are not officially supported and may require customization for your specific development machine.
The setup script currently downloads SSD Caffe and installs it in a system location.
A soft link to the Caffe installation is available at /opt/movidius/caffe
Caffe Models
Caffe models consist of two files that are used for compiling the caffe model using the NCSDK mvNCCompile tool:
- .prototxt - Text file that describes the topology and layers of the network
- .caffemodel - Binary file that contains the weights for each layer that are obtained after training a model
Caffe Layer Support
The following layers are supported in Caffe by the NCSDK. The NCSDK does not support network training, so some layers that are only required for training are not supported.
Activation/Neuron
- bias
- elu
- prelu
- relu
- scale
- sigmoid
- tanh
Common
- inner_product
Normalization
- batch_norm
- lrn
Utility
- concat
- eltwise
- flatten
- parameter
- reshape
- slice
- softmax
Vision
- conv
- Regular Convolution - 1x1s1, 3x3s1, 5x5s1, 7x7s1, 7x7s2, 7x7s4
- Group Convolution - <1024 groups total
- deconv
- pooling
Known Issues
Caffe Input Layer
Limitation: Batch Size, which is the first dimension, must always be 1
Limitation: The number of inputs must be 1
Limitation: We don’t support this “input_param” format for the input layer:
1 name: "GoogleNet"
2 layer {
3 name: "data"
4 type: "Input"
5 top: "data"
6 input_param { shape: { dim: *10* dim: 3 dim: 224 dim: 224 } }
7 }
We only support this “input_shape” format for the input layer:
name: "GoogleNet"
input: "data"
input_shape
{ dim:1 dim:3 dim:224 dim:224 }
Input Name
Input should be always called “data”.
This works:
name: "GoogleNet"
input: "data"
input_shape
{ dim:1 dim:3 dim:224 dim:224 }
This does not:
name: "GoogleNet"
input: "data_x"
input_shape
{ dim:1 dim:3 dim:224 dim:224 }
Crop Layer
Limitation: Crop layer cannot take reference size layer from input:”data”.
layer {
name: "score"
type: "Crop"
bottom: "upscore"
bottom: "data"
top: "score"
crop_param {
axis: 2
offset: 18
}
}
Size Limitations
Compiled Movidius™ “graph” file < 320 MB; Intermediate layer buffer size < 100 MB
[Error 35] Setup Error: Not enough resources on Myriad to process this network
Scratch Memory size < 112 KB
[Error 25] Myriad Error: "Matmul scratch memory [112640] lower than required [165392]"