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 ap-nsg
Visitor
1,264 Views
Registered: ‎08-07-2018

Tensorflow quantize - missing scripts/tools/documentation AWS Xilinx ML Suite (f1.2xlarge)

Hello,

I recently launched the AWS Xilinx ML Suite (f1.2xlarge) and tried the entire cycle as described in your webminar demo with bvlc_googlenet using the tensorflow framework. I succeeded with the loading of the tensorflow docker container as well as the compiler stage but I couldn't find the tools/script for the tensorflow quantize. (for example your webminar demo includes the file classify_pb.py)

Nevertheless, I couldn't find detailed documentation for a quantize stage of a tensforflow graph. It is very much different from other frameworks.

Am I missing something? 

Thanks!

0 Kudos
8 Replies
Xilinx Employee
Xilinx Employee
1,216 Views
Registered: ‎06-07-2018

Re: Tensorflow quantize - missing scripts/tools/documentation AWS Xilinx ML Suite (f1.2xlarge)

Visitor ap-nsg
Visitor
1,206 Views
Registered: ‎08-07-2018

Re: Tensorflow quantize - missing scripts/tools/documentation AWS Xilinx ML Suite (f1.2xlarge)

Hi,

Thanks for the quick response, however I tried the quantize.pyc with your googlenet tensorflow .pb model (bvlc_googlenet_without_lrn_test.pb) and and its asks for a caffe module:

 

Traceback (most recent call last):
File "./xfdnn/tools/quantize/quantize.py", line 43, in <module>
File "./xfdnn/tools/quantize/quantize_caffe.py", line 29, in <module>
ImportError: No module named caffe

 

I am trying to test the entire cycle from compile through quantize to deployment with goooglenetv1 but the quantize phase doesn't work and the documentation is not clear, it is geared toward caffe.

Can you give the short script for running the quantize within your tensorflow docker container and googlenetv1.

I have tried all kind of options with quantize.pyc as well as quantize_tf.pyc and it doesn't seams to work!

Thanks  

0 Kudos
Xilinx Employee
Xilinx Employee
1,191 Views
Registered: ‎06-07-2018

Re: Tensorflow quantize - missing scripts/tools/documentation AWS Xilinx ML Suite (f1.2xlarge)

Hi ap-nsg,

My fault. Please use quantize_tf.pyc on https://github.com/Xilinx/ml-suite/tree/master/xfdnn/tools/quantize.

"_tf" stands for Tensorflow.

All available docs is here https://github.com/Xilinx/ml-suite/tree/master/docs

0 Kudos
Visitor ap-nsg
Visitor
1,177 Views
Registered: ‎08-07-2018

Re: Tensorflow quantize - missing scripts/tools/documentation AWS Xilinx ML Suite (f1.2xlarge)

Hi jishuaiz,

Thanks again for your quick response. However, it looks like that something is missing for the tensorflow quantize stage.

Again, I am following the instruction on the Quantization tutorial using your GooglenetV1 example but with tensorflow:

1. I am connecting to F1

2. navigating to the tensorflow docker

3. starting the docker successfuly

4. exporting the root in the enviorment

5. navigating to the quantize directory

6. running the quantize_tf.pyc with a "bvlc_googlenet.pb" model (be aware its a .pb file) and all type of arguments.

the python code does nothing. I have tried different arguments ...

BTW, as said in the original message, The compile part of the example with tensorflow was successful. However the quantize! .

Can somebody test your quantize example with GooglenetV1 and post the few line script and instructions.

Again, I am trying to test the xfdnn through all stages up to deployment with tensorflow and googlenetv1 example.

Thanks

 

 

0 Kudos
Xilinx Employee
Xilinx Employee
1,135 Views
Registered: ‎06-07-2018

Re: Tensorflow quantize - missing scripts/tools/documentation AWS Xilinx ML Suite (f1.2xlarge)

Hi ap-nsg

Thanks. I will contact the developer and back to you later.

0 Kudos
898 Views
Registered: ‎09-25-2018

Re: Tensorflow quantize - missing scripts/tools/documentation AWS Xilinx ML Suite (f1.2xlarge)

Any updates on this issue? quantize_tf.pyc does nothing when I run it on local linux machine.

 

Thanks

0 Kudos
Observer durga_bhavani
Observer
667 Views
Registered: ‎11-08-2018

Re: Tensorflow quantize - missing scripts/tools/documentation AWS Xilinx ML Suite (f1.2xlarge)

quantize_tf.pyc does nothing when I run it with command as follows

python quantize_tf.py --model_file ../../../models/tensorflow/resnet/fp32/resnet50_without_bn_test.pb --quantize_config quantize.json --cal_dir calibration_directory/ --cal_size 1 --bitwidths 8,8,8

0 Kudos
Xilinx Employee
Xilinx Employee
614 Views
Registered: ‎06-07-2018

Re: Tensorflow quantize - missing scripts/tools/documentation AWS Xilinx ML Suite (f1.2xlarge)

Hi Weizhong, Durga,

There is update for tensorflow flow. Please follow this linker , https://github.com/Xilinx/ml-suite/blob/v1.2/notebooks/image_classification_tensorflow.ipynb .