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

CoreML conversion failure: PyTorch convert function for op 'silu_' not implemented. #10

Open
Jacobsolawetz opened this issue Apr 18, 2022 · 2 comments

Comments

@Jacobsolawetz
Copy link

CoreML conversion failure: PyTorch convert function for op 'silu_' not implemented.

It seems like my coreml tools are having an issue with registering the silu opp here - Has anyone else encountered this issue?

def silu(context, node):

@Jacobsolawetz
Copy link
Author

Added this and seems to be registering now

@register_torch_op
def silu_(context, node):
    inputs = _get_inputs(context, node, expected=1)
    x = inputs[0]
    y = mb.sigmoid(x=x)
    z = mb.mul(x=x, y=y, name=node.name)
    context.add(z)

@Leon0402
Copy link
Contributor

Sorry for the very late response. These sort of issues are because of a mismatch of the pyTorch version coreml supports and yolov5 uses. Registering missing operators yourself is one workaround for this. And as you quoted I already this this for silu.

Not sure what silu_ is or how it's different from silu, but what you did seems exactly right to me.

Perhaps the library should be upgraded to a newer coreml version and be tested against new yolov5 versions, but I don't have the time to this myself.

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

2 participants