File tree 1 file changed +9
-12
lines changed
1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change 17
17
# Prepare dataset
18
18
git clone https://github.com/intel/neural-compressor.git
19
19
cd neural-compressor/examples/tensorflow/nlp/bert_large_squad/quantization/ptq || exit
20
- bash prepare_dataset.sh --output_dir=./data > /dev/null 2>&1
21
20
21
+ echo " Preparing the model"
22
+ bash prepare_model.sh --output_dir=./model 2>&1
23
+ echo " Preparing the dataset"
24
+ bash prepare_dataset.sh --output_dir=./data 2>&1
22
25
# Preprocess the dataset
23
- python create_tf_record.py --vocab_file=./data/vocab.txt --predict_file=./data/dev-v1.1.json --output_file=./data/eval.tf_record > /dev/null 2>&1
26
+ echo " Preprocessing the dataset"
27
+ python create_tf_record.py --vocab_file=data/vocab.txt --predict_file=data/dev-v1.1.json --output_file=./eval.tf_record
24
28
25
- # Download model
26
- bash prepare_model.sh --output_dir=./model > /dev/null 2>&1
27
- python freeze_estimator_to_pb.py --input_model=./model --output_model=./bert_fp32.pb
28
-
29
- # Run quantization using INC
30
- bash run_quant.sh --input_model=./bert_fp32.pb --output_model=./bert_int8.pb --dataset_location=./data
31
-
32
- # Run tests on quantized model
33
- # bash run_benchmark.sh --input_model=./bert_squad_int8.pb --mode=performance --dataset_location=./data --batch_size=64
34
- # bash run_benchmark.sh --input_model=./bert_int8.pb --mode=accuracy --dataset_location=./data --batch_size=64
29
+ # Run quantization using INC
30
+ echo " Running quantization"
31
+ bash run_quant.sh --input_model=./bert_fp32.pb --output_model=./bert_int8.pb --dataset_location=./eval.tf_record
You can’t perform that action at this time.
0 commit comments