mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-02 03:55:34 +00:00
This commit is contained in:
parent
789bac1dc8
commit
3cdf42548f
1 changed files with 11 additions and 1 deletions
|
|
@ -81,7 +81,17 @@ def quant_pre_process(
|
|||
if not skip_symbolic_shape:
|
||||
# Need to save the inferenced model to file so as to run the optimizer
|
||||
input_model_path = str(temp_path / "symbolic_shape_inferred.onnx")
|
||||
onnx.save(model, input_model_path)
|
||||
if save_as_external_data:
|
||||
onnx.save_model(
|
||||
model,
|
||||
input_model_path,
|
||||
save_as_external_data=True,
|
||||
all_tensors_to_one_file=all_tensors_to_one_file,
|
||||
size_threshold=external_data_size_threshold,
|
||||
convert_attribute=False,
|
||||
)
|
||||
else:
|
||||
onnx.save(model, input_model_path)
|
||||
model = None
|
||||
|
||||
opt_model_path = str(temp_path / "optimized.onnx")
|
||||
|
|
|
|||
Loading…
Reference in a new issue