3 ms·
I've found that converting a custom PyTorch model to CoreML can be quite complex. I had to modify certain data types to facilitate the conversion process, which
by mromanuk 3y ago
I've found that converting a custom PyTorch model to CoreML can be quite complex. I had to modify certain data types to facilitate the conversion process, which was not straightforward.
The process becomes particularly frustrating when the model appears to convert successfully, but then fails to produce any output or loses layers entirely. Additionally, the debug information provided by the conversion tool isn't very helpful, adding to the challenge.
As an iOS developer with no prior experience in Python, I found myself in a unique position. I needed to build a custom model for one of my keyboard apps to handle tasks like spellchecking, grammar correction, next-word prediction, and autocompletion. This necessity pushed me to learn Python and PyTorch. After mastering these, I then had to convert my knowledge back to Swift and CoreML.
Ideally, I would have preferred to build my model directly in Swift & CoreML, but the current tools and resources for this approach are limited. This limitation is particularly evident in terms of the ease of use and flexibility that Python and PyTorch offer.