Skip to content

Commit 00cd9a0

Browse files
Adapt subset size to keep +- 300 pics for calibration
1 parent 825f281 commit 00cd9a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/openvino/aot/aot_openvino_compiler.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,12 @@ def main(
135135
def transform(x):
136136
return x[0]
137137

138+
default_subset_size = 300
139+
batch_size = calibration_dataset.batch_size
138140
quantized_model = quantize_pt2e(
139141
captured_model,
140142
quantizer,
143+
subset_size=(default_subset_size // batch_size) + int(default_subset_size % batch_size > 0),
141144
calibration_dataset=nncf.Dataset(calibration_dataset, transform_func=transform),
142145
fold_quantize=False,
143146
)

0 commit comments

Comments
 (0)