Earlier quoted context omitted.
Yes, model weights saved with Keras Core are backend-agnostic. You can train a model in one backend and reload it in another. Coral TPU could be used with Keras Core, but via the TensorFlow backend only.
Super cool, does that mean if someone trains something using the PyTorch backend, I can still use it with the coral if I load the weights using the tensorflow backend?
Keras Core: Keras for TensorFlow, Jax, and PyTorch
21–30 of 73 posts
Re: Keras Core: Keras for TensorFlow, Jax, and PyTorch
#22If I want to use this brave new keras with torch.compile, what does that look like?
Re: Keras Core: Keras for TensorFlow, Jax, and PyTorch
#23I worked on the project, happy to answer any questions!
Re: Keras Core: Keras for TensorFlow, Jax, and PyTorch
#24I worked on the project, happy to answer any questions!
This caught my eye:
> “Right now, we use tf.nest (a Python data structure processing utility) extensively across the codebase, which requires the TensorFlow package. In the near future, we intend to turn tf.nest into a standalone package, so that you could use Keras Core without installing TensorFlow.”
I recently migrated a TF project to PyTorch (would have been great to have keras_core at the time) and used torch.nested. Could this not be an option?
A second question. For “customizing what happens in fit()”. Must this be written in either TF/PyTorch/Jax only, or can this be done with keras_core.ops, similar to the example shown for custom components? The idea would be you can reuse the same training loop logic across frameworks, like for custom components.
Re: Keras Core: Keras for TensorFlow, Jax, and PyTorch
#25I worked on the project, happy to answer any questions!
Re: Keras Core: Keras for TensorFlow, Jax, and PyTorch
#26If I want to use this brave new keras with torch.compile, what does that look like?
We are still working on this feature. We try to have it in model.compile(jit_compile=True). https://github.com/keras-team/keras-core/blob/v0.1.0/keras_c...
Re: Keras Core: Keras for TensorFlow, Jax, and PyTorch
#27Keras and PyTorch! I thought I'd never see the day! Glad to see the two communities bury the hatchet.
Re: Keras Core: Keras for TensorFlow, Jax, and PyTorch
#28Earlier quoted context omitted.
> What's different now ? PyTorch adoption: back when Keras went hard into TensorFlow in 2018, both TF and PyTorch adoption were about the same with TF having a bit more popularity. Now, most of the papers and models released are PyTorch-first.
Yes I understand why they do the move (they want to attract pytorch user). What's the benefit for the user instead of directly using pytorch for example ? I see we can maybe use tpu by switching to jax etc... PS: sorry I'm a bit salty by my user experience of Keras.
Re: Keras Core: Keras for TensorFlow, Jax, and PyTorch
#29I worked on the project, happy to answer any questions!
Will Keras Core support direct deployment to edge devices like RPi or Arduino?
Will the experience of defining and training a model in JAX/PyTorch and then deploying to edge devices be seamless?
Anything related on the roadmap?
Re: Keras Core: Keras for TensorFlow, Jax, and PyTorch
#30If I want to use this brave new keras with torch.compile, what does that look like?
We are still working on this feature. We try to have it in model.compile(jit_compile=True). https://github.com/keras-team/keras-core/blob/v0.1.0/keras_c...