forked from tatz1101/Edge-AI-Platform-Tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquant.sh
More file actions
31 lines (23 loc) · 709 Bytes
/
quant.sh
File metadata and controls
31 lines (23 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# activate DECENT_Q Python3.6 virtual environment
conda activate decent_q3
# generate calibraion images and list file
python generate_images.py
# remove existing files
rm -rf ./quantize_results
# run quantization
echo "#####################################"
echo "QUANTIZE"
echo "#####################################"
decent_q quantize \
--input_frozen_graph ./freeze/frozen_graph.pb \
--input_nodes images_in \
--input_shapes ?,28,28,1 \
--output_nodes dense_1/BiasAdd \
--method 1 \
--input_fn graph_input_fn.calib_input \
--gpu 0 \
--calib_iter 200
echo "#####################################"
echo "QUANTIZATION COMPLETED"
echo "#####################################"