frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Alert: Beginning Tuesday, June 25th, we will be freezing this site and migrating the content and forums to our new home at https://forums.intel.com/s/topic/0TO0P000000PqZDWA0/intel-neural-compute-sticks. Check it out now!

UNABLE TO COMPILE CAFFE MODEL (NCSDK 1.10.01)

Hi, I got an error when trying to compile a simple MNIST caffe model for the Movidius stick. I have changed the prototxt file for the Movidius stick.

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

Comments

  • 3 Comments sorted by Votes Date Added
  • 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

  • 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.

  • 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..

Sign In or Register to comment.