Fix IMX onnx model path (#18813)

This commit is contained in:
Laughing 2025-01-22 19:05:38 +08:00 committed by GitHub
parent 5306a8cc1f
commit e17c1cdfe0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1286,7 +1286,7 @@ class Exporter:
f = Path(str(self.file).replace(self.file.suffix, "_imx_model")) f = Path(str(self.file).replace(self.file.suffix, "_imx_model"))
f.mkdir(exist_ok=True) f.mkdir(exist_ok=True)
onnx_model = f / Path(str(self.file).replace(self.file.suffix, "_imx.onnx")) # js dir onnx_model = f / Path(str(self.file.name).replace(self.file.suffix, "_imx.onnx")) # js dir
mct.exporter.pytorch_export_model( mct.exporter.pytorch_export_model(
model=quant_model, save_model_path=onnx_model, repr_dataset=representative_dataset_gen model=quant_model, save_model_path=onnx_model, repr_dataset=representative_dataset_gen
) )