Skip to content

Commit ed6d062

Browse files
committed
fix bug
Signed-off-by: Xin He <[email protected]>
1 parent 08c3c28 commit ed6d062

File tree

3 files changed

+2
-1
lines changed
  • examples/pytorch
    • image_recognition/torchvision_models/quantization
    • nlp/huggingface_models/text-classification/quantization/ptq_static/fx

3 files changed

+2
-1
lines changed

examples/pytorch/image_recognition/torchvision_models/quantization/ptq/cpu/fx/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ def main():
181181
from neural_compressor.config import Torch2ONNXConfig
182182
fp32_onnx_config = Torch2ONNXConfig(
183183
dtype="fp32",
184+
opset_version=14,
184185
example_inputs=torch.randn(1, 3, 224, 224),
185186
input_names=['input'],
186187
output_names=['output'],

examples/pytorch/image_recognition/torchvision_models/quantization/qat/fx/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ def training_func_for_nc(model):
206206
from neural_compressor.config import Torch2ONNXConfig
207207
fp32_onnx_config = Torch2ONNXConfig(
208208
dtype="fp32",
209+
opset_version=14,
209210
example_inputs=torch.randn(1, 3, 224, 224),
210211
input_names=['input'],
211212
output_names=['output'],

examples/pytorch/nlp/huggingface_models/text-classification/quantization/ptq_static/fx/run_glue.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,6 @@ def eval_func(model):
519519
fp32_onnx_config = Torch2ONNXConfig(
520520
dtype="fp32",
521521
opset_version=14,
522-
quant_format="QDQ",
523522
example_inputs=tuple(input.values()),
524523
input_names=list(input.keys()),
525524
output_names=['labels'],

0 commit comments

Comments
 (0)