Thank you very much for your reply
model.qconfig = torch.quantization.QConfig(
activation=torch.quantization.observer.MinMaxObserver.with_args(dtype=torch.quint8,
qscheme=torch.per_channel_affine,
reduce_range=True),
weight=torch.quantization.observer.PerChannelMinMaxObserver.with_args(dtype=torch.qint8,
qscheme=torch.per_channel_affine,
reduce_range=False))
The total number of calibration data sets remains unchanged, and different batch_sizes (8, 16, 32, 64) are tested, and the quantized accuracy rate will still slightly fluctuate.
batch_size has little effect on the quantization result, I can choose a group with the highest accuracy as the final quantization result.