- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Tags:
- Caffe
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@yairh The NCS is meant to be used with models that are ready to deploy, so all layers related to training, testing, and the data layer must be removed. Layers that expect data with labels are no longer needed, because the incoming data will no longer have labels. The ArgMax layer should be removed from the prototxt file because ArgMax layers are usually computed on the host CPU. Afterwards, the rest can be done on the NCS. Additionally the deployment prototxt file should also have this declaration format at the top of the file:
name: "user_network"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 24
dim: 24
}
Let me know if this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks it helped :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I got the same error when trying to compile a simple MNIST model.
Traceback (most recent call last):
File "/usr/local/bin/mvNCCompile", line 118, in
create_graph(args.network, args.inputnode, args.outputnode, args.outfile, args.nshaves, args.inputsize, args.weights)
File "/usr/local/bin/mvNCCompile", line 101, in create_graph
net = parse_caffe(args, myriad_config)
File "/usr/local/bin/ncsdk/Controllers/CaffeParser.py", line 328, in parse_caffe
input_bottom = net.bottom_names[inputNodeName][0]
IndexError: list index out of range
====== prototxt file ===========
name: "user_network"
input: "data"
input_shape {
dim: 1
dim: 1
dim: 28
dim: 28
}
layer {
name: "conv1"
type: "Convolution"
bottom: "data"
top: "conv1"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
convolution_param {
num_output: 20
kernel_size: 5
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "pool1"
type: "Pooling"
bottom: "conv1"
top: "pool1"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv2"
type: "Convolution"
bottom: "pool1"
top: "conv2"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
convolution_param {
num_output: 50
kernel_size: 5
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "pool2"
type: "Pooling"
bottom: "conv2"
top: "pool2"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "ip1"
type: "InnerProduct"
bottom: "pool2"
top: "ip1"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
inner_product_param {
num_output: 500
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu1"
type: "ReLU"
bottom: "ip1"
top: "ip1"
}
layer {
name: "ip2"
type: "InnerProduct"
bottom: "ip1"
top: "ip2"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
inner_product_param {
num_output: 10
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
========= Compilation ==========
mvNCCompile mymodel.prototxt -w mymodel.caffemodel -s 12 -in input -on ip2 -is 28 28 -o my_net.graph
=============================
I have modified the prototxt file for the Movidius stick.
Thanks
Sahad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I was able to compile by changing the input node in compilation command to "conv1" instead of "input" .
=========================
mvNCCompile ./mymodel.prototxt -w ./mymodel.caffemodel -s 12 -in conv1 -on ip2 -is 28 28 -o ./my_net.graph
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately, it gives inconsistent results. I think the input node in compilation should be "input". But, there seems to have a bug when giving "input" as the input node.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, my bad..
mvNCCompile ./mymodel.prototxt -w ./mymodel.caffemodel -s 12 -in conv1 -on ip2 -is 28 28 -o ./my_net.graph
,works fine.
I ran a VGG 19 layer pre-trained model to classify between 1000 different image classes of Imagenet, with an inference time of almost 0.98 seconds..
![](/skins/images/45C6C2D737ED71F4C51F0145C8CB1E9C/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page