-
Notifications
You must be signed in to change notification settings - Fork 634
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
Error reporting that upsample_nearest2d is not yet implemented for PyTorch conversion #747
Comments
So I guess in the meantime, if we do not want to go away from LeakyReLU and UpSample Nearest 2D, we would have to implement them as composite operators based on this: https://coremltools.readme.io/docs/composite-operators Is there any way we would be able to point in this change directly to the MIL implemention operations?
|
Thank you for reporting the issue. |
@dlawrences Great idea about using composite operators and just referencing the base implementations! Here is my clumsy attempt at what you suggested. It compiles and gets through most of the conversion, but gets hung up a little further down the line ( Regardless, at least it's importing these layers correctly now. Hopefully this is helpful to you or someone else who is struggling with the same thing. Caveat: I don't know if I have the inputs to leaky_relu_ in the correct order -- the parameters of I put this near the top of my conversion script so that it registers these new pytorch operations when attempting to do conversion.
|
Thanks @HanClinto , that's great. I'll give it a go later today and see how it goes. In terms of your problem, I could help you if you provided a Netron file of the PyTorch model. Cheers |
@dlawrences I suspect we're using very similar models -- it sounds like you're using the Ultralytics YOLOv5 model, and I'm currently using the Ultralytics YOLOv3 model. I'm not sure how to export a file from Netron in any format other than PNG / SVG -- is that what you're asking for? Thank you VERY much for the offer of help! |
Sorry, it's really early for me, kinda sleepy. Yea, I am using YOLOv5. Please send me the .pt file if that's something you can provide, otherwise an image would do, albeit it would be harder digging through all the ops. |
@dlawrences That would be very much appreciated, thank you! I e-mailed the link to your gmail address listed in your Github profile. |
Hello @dlawrences @HanClinto Can you try converting the model using this PR? #758 |
Hi @DawerG I'll give it a go tomorrow. Thank you for the swift turnaround. Cheers |
Hi @DawerG I've seen you have merged the PR by this point. I have installed the latest version of coremltools by doing:
Conversion works well having this package. No issue for Cheers! |
remove auth token from for TI test
Hi team
I am converting an YOLO network to CoreML through Torchscript and the Unified Conversion API.
During conversion, the following error is thrown:
I guess this is similar to: #736
Is this going to be added to the next beta release? In the meantime, could I use any custom functions that I can pass to the converted to replace the upsample_nearest2d (some docs would help me a lot, I am having a hard time finding the right things it seems).
Cheers
The text was updated successfully, but these errors were encountered: