Skip to content

Commit a885c23

Browse files
author
tylertitsworth
committed
update inc script
Signed-off-by: tylertitsworth <tyler.titsworth@intel.com>
1 parent 7ab24e1 commit a885c23

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

tensorflow/tests/inc_test.sh

+9-12
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,15 @@
1717
# Prepare dataset
1818
git clone https://github.com/intel/neural-compressor.git
1919
cd neural-compressor/examples/tensorflow/nlp/bert_large_squad/quantization/ptq || exit
20-
bash prepare_dataset.sh --output_dir=./data >/dev/null 2>&1
2120

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
2225
# 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
2428

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

0 commit comments

Comments
 (0)