Replies: 4 comments 5 replies
-
You can use Keras to convert your model in PyTorch into Keras manually. Once the Keras code has been written, it becomes very easy to run that Keras code into any of the three backends - TensorFlow, PyTorch or JAX. Keras is not an automated converter tool, it acts like a framework that is more backend-independent. For simple models, writing such converters is easy, but for complex ones, dynamic graphing, manual intervention is a must. Best Regards, |
Beta Was this translation helpful? Give feedback.
-
As of now TTBOMK, no utility converts the actual model object or code to and from Keras ( Keras 3). manual conversion is in order( shouldn't be too tedious given you're planning to run the models on edge devices) , as for weight conversion for keras( Keras 2) ONNX is somewhat viable in my experience |
Beta Was this translation helpful? Give feedback.
-
no problem. my lib is written by pure Keras API. It can easily convert torch model to jax or tf |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I recently had to convert PyTorch models to Tensorflow models and then to TFLite models for export to Android devices.
Existing options are somewhat cumbersome or limited, I encountered issues when trying to use ONNX as a bridge, and the Nobuco library what difficult to debug to make it work, even though I managed to make the pipeline work with Nobuco in the end.
Now that Keras is multi-backend, is there an easy way to use Keras as a bridge for converting between native PyTorch and Jax models to Tensorflow models ?
And if there is currently no way, is it possible to imagine writing a small library based on Keras that does this ?
Beta Was this translation helpful? Give feedback.
All reactions