coreml : always convert to "neuralnetwork" (#2770)

This commit is contained in:
mgrachten 2025-02-03 21:36:32 +01:00 committed by GitHub
parent 90e3c5fc40
commit cff8868b5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -245,7 +245,7 @@ def convert_encoder(hparams, model, quantize=False):
model = ct.convert(
traced_model,
convert_to=None if quantize else "mlprogram", # convert will fail if weights are quantized, not sure why
convert_to="neuralnetwork",
inputs=[ct.TensorType(name="logmel_data", shape=input_shape)],
outputs=[ct.TensorType(name="output")],
compute_units=ct.ComputeUnit.ALL
@ -268,7 +268,7 @@ def convert_decoder(hparams, model, quantize=False):
model = ct.convert(
traced_model,
convert_to=None if quantize else "mlprogram", # convert will fail if weights are quantized, not sure why
convert_to="neuralnetwork",
inputs=[
ct.TensorType(name="token_data", shape=tokens_shape, dtype=int),
ct.TensorType(name="audio_data", shape=audio_shape)