UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer jorge_2015
Observer
491 Views
Registered: ‎12-06-2017

Error using decent command

Hi,

 

I have downloaded the DP-8020 DNNDK from DeePhi web page (deephi_dnndk_v2.06_beta_DP-8020) and I am following the instructions in docs folder but after installing decent and dnnc tools I am having this error when I run the decent_resnet50.sh example:

 

./decent_inception_v1.sh 
WARNING: Logging before InitGoogleLogging() is written to STDERR
E1007 13:48:37.625969 19663 decent_q.cpp:104] Available caffe actions:
E1007 13:48:37.626034 19663 decent_q.cpp:107]   check
E1007 13:48:37.626041 19663 decent_q.cpp:107]   deploy
E1007 13:48:37.626046 19663 decent_q.cpp:107]   finetune
E1007 13:48:37.626051 19663 decent_q.cpp:107]   quantize
E1007 13:48:37.626056 19663 decent_q.cpp:107]   test
F1007 13:48:37.626061 19663 decent_q.cpp:109] Unknown action: fix
*** Check failure stack trace: ***
./decent_inception_v1.sh: línea 13: 19663 Aborted                (`core' generated) decent fix -model ${model_dir}/float.prototxt -weights ${model_dir}/float.caffemodel -output_dir ${output_dir}

Is decent fix supported for this version? Or do I need to launch another command for quantization?

 

Thanks!

 

Jorge

 

PD: The website is very slow!! 

 

 

0 Kudos
2 Replies
Highlighted
Observer jorge_2015
Observer
480 Views
Registered: ‎12-06-2017

Re: Error using decent command

Okey,

 

I have been launching decent executable for deephi_dnndk_1.10_beta and deephi_dnndk_v2.06_beta_DP-8020 and I have realised that:

 

  • For deephi_dnndk_1.10_beta fix command exists.
~/Deephi/deephi_dnndk_1.10_beta/host_x86/pkgs/bin$ ./decent 
decent: command line brew
usage: decent <command> <args>

commands:
  fix             transform float model to fix (need calibration with dataset) and deploy to DPU
example:
  1. fix:                    ./decent fix -model float.prototxt -weights float.caffemodel -gpu 0
  2. fix with auto test:     ./decent fix -model float.prototxt -weights float.caffemodel -gpu 0 -auto_test test_iter 50
  3. fix with diffs method:  ./decent fix -model float.prototxt -weights float.caffemodel -gpu 0 -method 1


  Flags from tools/decent.cpp:
    -auto_test (Optional: test after calibration, need test dataset) type: bool
      default: false
    -calib_iter (Optional: max iterations for fix calibration) type: int32
      default: 100
    -data_bit (Optional: data bit width after fix) type: int32 default: 8
    -gpu (Optional: the GPU device id for calibration and test) type: string
      default: "0"
    -ignore_layers (Optinal: list of layers to be ignore during fix,
      comma-delimited) type: string default: ""
    -ignore_layers_file (Optional: YAML file which defines the layers to be
      ignore during fix, start with 'ignore_layers:') type: string default: ""
    -input_blob (Optional: name of input data blob) type: string
      default: "data"
    -method (Optional: method for fix, 0: OVERFLOW, 1: DIFF_S) type: int32
      default: 0
    -model (The model definition protocol buffer text file.) type: string
      default: ""
    -output_dir (Optional: Output directory for the fix results) type: string
      default: "./fix_results"
    -ssd (Optional: SSD testing with three AP computing styles: 11point,
      MaxIntegral, Integral) type: string default: ""
    -test_iter (Optional: max iterations for test) type: int32 default: 50
    -weights (The pretrained float weights for fix.) type: string default: ""
    -weights_bit (Optional: weights and bias bit width after fix) type: int32
      default: 8
  • For deephi_dnndk_v2.06_beta_DP-8020 fix command doesn't exist.
~/Deephi/deephi_dnndk_v2.06_beta_DP-8020/host_x86/pkgs/ubuntu16.04/cuda_9.0_cudnn_v7.0.5$ ./decent 
decent: command line brew
usage: fix_tool <command> <args>

commands:
  quantize        transform float model to fix (need calibration with dataset) and deploy to DPU
  deploy          deploy finetuned model to DPU
  finetune        train or finetune a model
  test            score a model
example:
  1. quantize:                      ./decent_q quantize -model float.prototxt -weights float.caffemodel -gpu 0
  2. quantize with auto test:       ./decent_q quantize -model float.prototxt -weights float.caffemodel -gpu 0 -auto_test -test_iter 50
  3. quantize with method 0:        ./decent_q quantize -model float.prototxt -weights float.caffemodel -gpu 0 -method 0
  4. finetune quantized model:      ./decent_q finetune -model fix_results/float_train_test.prototxt -weights fix_results/float_train_test.caffemodel -gpu 0
  5. deploy finetuned fixed model:  ./decent_q depoly -model fix_train_test.prototxt -weights fix_finetuned.caffemodel -gpu 0


  Flags from tools/decent_q.cpp:
    -auto_test (Optional: test after calibration, need test dataset) type: bool
      default: false
    -calib_iter (Optional: max iterations for fix calibration) type: int32
      default: 100
    -classNUM (The number of segmentation classes.) type: int32 default: 19
    -data_bit (Optional: data bit width after fix) type: int32 default: 8
    -gpu (Optional: the GPU device id for calibration and test) type: string
      default: "0"
    -ignore_layers (Optinal: list of layers to be ignore during fix,
      comma-delimited) type: string default: ""
    -ignore_layers_file (Optional: YAML file which defines the layers to be
      ignore during fix, start with 'ignore_layers:') type: string default: ""
    -include_ip (Whether the InnerProduct layer is quantized.) type: bool
      default: false
    -input_blob (Optional: name of input data blob) type: string
      default: "data"
    -keep_bn (Optional: remain BatchNorm layers) type: bool default: true
    -method (Optional: method for fix, 0: OVERFLOW, 1: DIFF_S) type: int32
      default: 1
    -model (The model definition protocol buffer text file.) type: string
      default: ""
    -output_dir (Optional: Output directory for the fix results) type: string
      default: "./fix_results"
    -quan_bits (The number of bits used in quantization.) type: int32
      default: 8
    -segmentation (Optional; Segmentation testing using metric:classIOU)
      type: string default: ""
    -sigmoided_layers (Optinal: list of layers before sigmoid operation, to be
      fixed with optimization for sigmoid accuracy) type: string default: ""
    -solver (The solver for finetuning or training.) type: string default: ""
    -ssd (Optional: SSD testing with three AP computing styles: 11point,
      MaxIntegral, Integral) type: string default: ""
    -test_iter (Optional: max iterations for test) type: int32 default: 50
    -weights (The pretrained float weights for fix.) type: string default: ""
    -weights_bit (Optional: weights and bias bit width after fix) type: int32
      default: 8
    -yolo (Optional: YOLO testing with three AP computing styles: 11point,
      MaxIntegral, Integral) type: string default: ""

 

Please be careful mixing versions and writing documentation 

 

0 Kudos
Xilinx Employee
Xilinx Employee
414 Views
Registered: ‎02-18-2013

Re: Error using decent command

@jorge_2015, from this release and later on, decent fix has been changed to decent quantize. 

 

Please change decent fix in the decent_inception_v1.sh to decent quantize 

 

Regards,

Andy

0 Kudos