Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about converting to coreml #33

Open
GaffeyFF opened this issue Apr 9, 2024 · 0 comments
Open

about converting to coreml #33

GaffeyFF opened this issue Apr 9, 2024 · 0 comments

Comments

@GaffeyFF
Copy link

GaffeyFF commented Apr 9, 2024

import coremltools as ct
from coremltools.converters.mil.mil import types
coreml_model = ct.convert(
traced_model,
convert_to="mlprogram",
inputs=[ct.TensorType(shape=(1, 3, 16, 224, 224),dtype=types.float)]
)
coreml_model.save('yowo_tiny.mlmodel')

File "C:\Users\Admin\AppData\Roaming\Python\Python310\site-packages\coremltools\converters\mil\mil\builder.py", line 168, in _add_op
new_op = op_cls(**kwargs)
File "C:\Users\Admin\AppData\Roaming\Python\Python310\site-packages\coremltools\converters\mil\mil\operation.py", line 190, in init
self._validate_and_set_inputs(input_kv)
File "C:\Users\Admin\AppData\Roaming\Python\Python310\site-packages\coremltools\converters\mil\mil\operation.py", line 503, in _validate_and_set_inputs
self.input_spec.validate_inputs(self.name, self.op_type, input_kvs)
File "C:\Users\Admin\AppData\Roaming\Python\Python310\site-packages\coremltools\converters\mil\mil\input_type.py", line 163, in validate_inputs
raise ValueError(msg.format(name, var.name, input_type.type_str,
ValueError: Op "pred_reg.1" (op_type: gather) Input indices="anchor_idxs.1" expects tensor or scalar of dtype from type domain ['int32'] but got tensor[is1,fp32]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant