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: 
Visitor sota0104
Visitor
499 Views
Registered: ‎09-12-2018

AssertionError: Theshold is not a scalar

 

Has anyone encountered the following error when invoke yolo's run.sh?

I could run googlenet demo in ml-suite successfully, so I believe there should be nothing wrong about setup.

 

(ml-suite) [x@localhost yolo]$ ./run.sh 1525 e2e
Running with images: ../../xfdnn/tools/quantize/calibration_directory/13923040300_b4c8521b4d_z.jpg
../../xfdnn/tools/quantize/calibration_directory/14931486720_37bd588ce9_z.jpg

 

==snip==

==snip==

 --------------------------------------------------------------------------------
Processing layer 1 of 54
Layer Name:conv0 Type:Convolution
Inputs: ['data'], Outputs: ['conv0']
Quantizing conv input layer ... conv0
Traceback (most recent call last):
  File "yolo.py", line 86, in <module>
    quantizer.quantize()
  File "./xfdnn/tools/quantize/quantize.py", line 157, in quantize
  File "./xfdnn/tools/quantize/quantize_caffe.py", line 110, in executeCalibration
  File "./xfdnn/tools/quantize/quantize_caffe.py", line 225, in preProcess
  File "./xfdnn/tools/quantize/quantize_base.py", line 142, in QuantizeThresholdBlob
AssertionError: Theshold is not a scalar

 

Also, I attached the whole log..

 

Cheers,

0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
454 Views
Registered: ‎09-11-2014

Re: AssertionError: Theshold is not a scalar

This error pops up from time to time depending on your version of numpy.

 

If numpy == 1.14.5 it shouldn't happen.

 

There is an assertion in python that is checking that a value is of type numpy.float64

 

The assertion was meant to check that something was a singular value instead of an array. The assertion fails sometimes if the value coming in was numpy.float32.

 

We have fixed this in our internal code, and the fix will be published shortly.

0 Kudos