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

cannot reproduce the fast mlmodel #3

Closed
YingkunZhou opened this issue Apr 17, 2023 · 2 comments
Closed

cannot reproduce the fast mlmodel #3

YingkunZhou opened this issue Apr 17, 2023 · 2 comments

Comments

@YingkunZhou
Copy link

YingkunZhou commented Apr 17, 2023

I download the mlmodel which mentioned in Readme and also use almost the same environment to convert pytorch model to mlmodel

  • torch==1.10.1
  • coremltools==5.2.0
  • timm==0.5.4

image

the left is mine, the right is downloaded from https://drive.google.com/file/d/1tZVxtbtAZoLLoDc5qqoUGulilksomLeK/view?usp=sharing

here is the layer distribution diff

image

and here is the performance diff

image

  • Xcode version is Version 14.3 (14E222b)
  • test on M1 mini
@Amshaker
Copy link
Owner

Hi,

Please change this boolean "CoreMLConversion" in swiftformer.py to True before converting your model to mlmodel. The normalization layer is currently not supported by coreml and this boolean disables this layer. I raised an issue into coreml and hopefully they support it soon.

Please let me know if you still not be able to reproduce the same performance.

Best regards,
Abdelrahman.

@YingkunZhou
Copy link
Author

oh I see, thanks.

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