mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-02-21 01:21:26 +00:00
coreml : always convert to "neuralnetwork" (#2770)
This commit is contained in:
parent
90e3c5fc40
commit
cff8868b5f
@ -245,7 +245,7 @@ def convert_encoder(hparams, model, quantize=False):
|
|||||||
|
|
||||||
model = ct.convert(
|
model = ct.convert(
|
||||||
traced_model,
|
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)],
|
inputs=[ct.TensorType(name="logmel_data", shape=input_shape)],
|
||||||
outputs=[ct.TensorType(name="output")],
|
outputs=[ct.TensorType(name="output")],
|
||||||
compute_units=ct.ComputeUnit.ALL
|
compute_units=ct.ComputeUnit.ALL
|
||||||
@ -268,7 +268,7 @@ def convert_decoder(hparams, model, quantize=False):
|
|||||||
|
|
||||||
model = ct.convert(
|
model = ct.convert(
|
||||||
traced_model,
|
traced_model,
|
||||||
convert_to=None if quantize else "mlprogram", # convert will fail if weights are quantized, not sure why
|
convert_to="neuralnetwork",
|
||||||
inputs=[
|
inputs=[
|
||||||
ct.TensorType(name="token_data", shape=tokens_shape, dtype=int),
|
ct.TensorType(name="token_data", shape=tokens_shape, dtype=int),
|
||||||
ct.TensorType(name="audio_data", shape=audio_shape)
|
ct.TensorType(name="audio_data", shape=audio_shape)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user