Skip to content

Commit 4418482

Browse files
committed
fix: Update dataset location for resnet models
Signed-off-by: Sun, Xuehao <[email protected]>
1 parent 7934b93 commit 4418482

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.azure-pipelines/scripts/models/run_onnxrt_models_trigger.sh

+19-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ done
2020

2121
CONFIG_PATH="/neural-compressor/examples/.config/model_params_onnxrt.json"
2222
model_src_dir=$(jq -r ".\"onnxrt\".\"$model\".\"model_src_dir\"" "$CONFIG_PATH")
23-
dataset_location=$(jq -r ".\"onnxrt\".\"$model\".\"dataset_location\"" "$CONFIG_PATH")
23+
if [ $model == *"resnet"* ]; then
24+
dataset_location="/tf_dataset2/datasets/imagenet/ImagenetRaw/ImagenetRaw_small_5000/ILSVRC2012_img_val"
25+
label_path="/tf_dataset2/datasets/imagenet/ImagenetRaw/ImagenetRaw_small_5000/val.txt"
26+
else
27+
dataset_location=$(jq -r ".\"onnxrt\".\"$model\".\"dataset_location\"" "$CONFIG_PATH")
28+
fi
29+
2430
input_model=$(jq -r ".\"onnxrt\".\"$model\".\"input_model\"" "$CONFIG_PATH")
2531

2632
function run_prepare_model() {
@@ -32,10 +38,18 @@ function run_prepare_model() {
3238
}
3339

3440
function run_quantize() {
35-
bash run_quant.sh --input_model="$input_model" \
36-
--dataset_location="$dataset_location" \
37-
--label_path="$model" \
38-
--output_model="./model_tune"
41+
if [ "$model" == "bert-base-uncased" ]; then
42+
bash run_quant.sh --input_model="$input_model" \
43+
--dataset_location="$dataset_location" \
44+
--label_path="$model" \
45+
--output_model="./model_tune" \
46+
--quant_format="QDQ"
47+
else
48+
bash run_quant.sh --input_model="$input_model" \
49+
--dataset_location="$dataset_location" \
50+
--label_path="$model" \
51+
--output_model="./model_tune"
52+
fi
3953
}
4054

4155
function run_accuracy() {

0 commit comments

Comments
 (0)