08-08-2018 01:53 PM
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?
08-08-2018 11:15 PM
These linker may help.
Tensorflow quantize use the same quantize .pyc as caffe quantize. You can find it here.
08-09-2018 06:24 PM
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!
08-10-2018 12:00 AM
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
08-10-2018 04:54 PM
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.
08-13-2018 09:54 PM
Thanks. I will contact the developer and back to you later.
09-25-2018 12:11 PM
Any updates on this issue? quantize_tf.pyc does nothing when I run it on local linux machine.
11-08-2018 09:37 PM
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
11-12-2018 06:13 PM