cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
xxd137494375
Visitor
Visitor
886 Views
Registered: ‎02-09-2019

Error while running

[DNNDK] Invalid mean value for DPU kernel. kernel name : anet_0

There is a error at run time,How to solve this problem?

 

Thanks!

IMG_20190209_185813.jpg
0 Kudos
Reply
7 Replies
gguasti
Xilinx Employee
Xilinx Employee
833 Views
Registered: ‎11-29-2007

hello

The invalid mean value might be due to a wrong setup in the prototxt file describing the CNN architecture. For the final step (compilation) the deployed.prototxt should have commented all references to the mean_file. Only the mean values should be present.

0 Kudos
Reply
xxd137494375
Visitor
Visitor
816 Views
Registered: ‎02-09-2019

How can I modify this network?

 

layer {
name: "data"
type: "ImageData"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
mirror: true
crop_size: 126
scale: 0.017
}
image_data_param {
source: "/home/aa/demo/Classification/train.txt"
root_folder: "/home/aa/demo/Classification/all-images/"
batch_size: 50
new_width: 126
new_height: 126
is_color: false
shuffle: true
}
}
layer {
name: "data"
type: "ImageData"
top: "data"
top: "label"
include {
phase: TEST
}
transform_param {
mirror: false
crop_size: 126
scale: 0.017
}
image_data_param {
source: "/home/aa/demo/Classification/test.txt"
root_folder: "/home/aa/demo/Classification/all-images/"
batch_size: 25
new_width: 126
new_height: 126
is_color: false
}
}

0 Kudos
Reply
xxd137494375
Visitor
Visitor
809 Views
Registered: ‎02-09-2019

Do I need to retrain?
0 Kudos
Reply
aluo
Xilinx Employee
Xilinx Employee
781 Views
Registered: ‎02-18-2013

@xxd137494375How do you set the mean value in float prototxt? Here below is an example -

 

name: "ResNet-50"
layer {
  name: "data"
  type: "ImageData"
  top: "data"
  top: "label"
  include {
    phase: TRAIN
  }
  transform_param {
    mirror: false
    mean_value: 104
    mean_value: 107
    mean_value: 123
  }
  image_data_param {
#    source: "./data/imagenet_256/calibration.txt"
#    root_folder: "./data/imagenet_256/calibration_images/"
    source: "/down/dnndk_2.08/common/dataset/imagenet/val.txt"
    root_folder: "/down/dnndk_2.08/common/dataset/imagenet/val/"
    batch_size: 10
    shuffle: false
    new_height: 224
    new_width: 224
  }
}
layer {
  name: "conv1"
  type: "Convolution"
  bottom: "data"
  top: "conv1"
  convolution_param {
    num_output: 64
    pad: 3
    kernel_size: 7
    stride: 2
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"

0 Kudos
Reply
xxd137494375
Visitor
Visitor
763 Views
Registered: ‎02-09-2019

My float.prototxt are below,i did not set the mean_value



layer {
name: "data"
type: "ImageData"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
mirror: true
crop_size: 126
scale: 0.017
}
image_data_param {
source: "/home/aa/demo/Classification/train.txt"
root_folder: "/home/aa/demo/Classification/all-images/"
batch_size: 50
new_width: 126
new_height: 126
is_color: false
shuffle: true
}
}
layer {
name: "data"
type: "ImageData"
top: "data"
top: "label"
include {
phase: TEST
}
transform_param {
mirror: false
crop_size: 126
scale: 0.017
}
image_data_param {
source: "/home/aa/demo/Classification/test.txt"
root_folder: "/home/aa/demo/Classification/all-images/"
batch_size: 25
new_width: 126
new_height: 126
is_color: false
}
}
0 Kudos
Reply
xxd137494375
Visitor
Visitor
750 Views
Registered: ‎02-09-2019

Besides,I use black and white images.
0 Kudos
Reply
marron
Contributor
Contributor
576 Views
Registered: ‎10-27-2008

Not certain if this was resolved, sharing my experience just in case.

I ran into the same issue as you, with the following prototxt definition:

   transform_param {
      scale: 0.00390625
      mirror: false
   }

Note the 1/256 scale is for the binary input image, similar to what you mentionned.

I was able to resolve the issue by adding the missing "mean_value" value (just one, since this is a grayscale image (not rgb).

   transform_param {
      scale: 0.00390625
      mirror: false
      mean_value: 0
   }

 

Hope this helps !

AlbertaBeef ;)

0 Kudos
Reply