models : use absolute paths for the converted model (#1356)

This commit is contained in:
bobqianic 2023-11-03 08:44:27 +00:00 committed by GitHub
parent d445098c8f
commit 8a2bee6717
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,7 @@ def convert_encoder(hparams, encoder, mname):
# use model optimizer to convert onnx to OpenVINO IR format # use model optimizer to convert onnx to OpenVINO IR format
encoder_model = mo.convert_model(onnx_path, compress_to_fp16=True) encoder_model = mo.convert_model(onnx_path, compress_to_fp16=True)
serialize(encoder_model, xml_path='ggml-' + mname + '-encoder-openvino.xml') serialize(encoder_model, xml_path=os.path.join(os.path.dirname(__file__),"ggml-" + mname + "-encoder-openvino.xml"))
#cleanup #cleanup
if os.path.isdir(onnx_folder): if os.path.isdir(onnx_folder):