News for hackers. Stuff that matters.
Re:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by kerasteam on Tuesday July 11, 2023 @11:45AM (#36682624)
I worked on the project, happy to answer any questions!
Re:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by binarymax on Tuesday July 11, 2023 @12:33PM (#36683415)
Congrats on the launch! I learned Keras back when I first got in to ML, so really happy to see it making a comeback. Are there some example architectures available/planned that are somewhat complex, and not just a couple layers (BERT, ResNet, etc.)?
Re:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by kerasteam on Tuesday July 11, 2023 @12:41PM (#36683533)
Yes, you can check out KerasCV and KerasNLP which host pretrained models like ResNet, BERT, and many more. They run on all backends as of the latest releases (today), and converting them to be backend-agnostic was pretty smooth! It took a couple of weeks to convert the whole packages.

https://github.com/keras-team/keras-nlp/tree/master/keras_nl... https://github.com/keras-team/keras-cv/tree/master/keras_cv/...

Re:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by dbish on Tuesday July 11, 2023 @12:01PM (#36682918)
Great to see this, but I’m curious, does this mean we’ll get fewer fchollet tweets that talk up TF and down PyTorch? Is the rivalry done?
Re:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by sbrother on Tuesday July 11, 2023 @12:02PM (#36682927)
This looks awesome; I was a big fan of Keras back when it had pluggable backends and a much cleaner API than Tensorflow.

Fast forward to now, and my biggest pain point is that all the new models are released on PyTorch, but the PyTorch serving story is still far behind TF Serving. Can this help convert a PyTorch model into a servable SavedModel?

Re:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by kerasteam on Tuesday July 11, 2023 @12:06PM (#36682997)
For a Keras Core model to be usable with the TF Serving ecosystem, it must be implemented either via Keras APIs (Keras layers and Keras ops) or via TF APIs.

To use pretrained models, you can take a look at KerasCV and KerasNLP, they have all the classics, like BERT, T5, OPT, Whisper, StableDiffusion, EfficientNet, YOLOv8, etc. They're adding new models regularly.

Re:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by ayhanfuat on Tuesday July 11, 2023 @12:02PM (#36682935)
This is an amazing contribution to the NN world. Thank you all the team members.
Re:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by johnhenning on Tuesday July 11, 2023 @12:50PM (#36683676)
Do you foresee any compatibility or integration issues with higher level frameworks, i.e. lightning, transformers, etc?
Re:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by yazanobeidi on Tuesday July 11, 2023 @12:52PM (#36683715)
Hi, first off thank you for your contributions, and this goes to the entire team. Keras is a wonderful tool and this was definitely the right move to do. No other package nails the “progressive disclosure” philosophy like Keras.

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:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by kerasteam2 on Tuesday July 11, 2023 @02:02PM (#36684801)
At this time, there are no backend-agnostic APIs to implement training steps/training loops, because each backend handles training very differently so no shared abstraction can exist (expecially for JAX). So when customizing fit() you have to use backend-native APIs.

If you want to make a model with a custom train_step that is cross-backend, you can do something like:

  def train_step(self, *args, *kwargs):
    if keras.config.backend() == "tensorflow":
      return self._tf_train_step(*args, *kwargs)
    elif ...
BTW it looks the previous account is being rate-limited to less than 1 post / hour (maybe even locked for the day) so I will be very slow to answer questions.
Re:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by seanhunter on Tuesday July 11, 2023 @12:57PM (#36683787)
Firstly thanks to all the team for everything you have done and congrats on this. It must have been a ton of work and I am excited to get my hands on it.
Re:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by __rito__ on Tuesday July 11, 2023 @01:04PM (#36683901)
How does the future look for TFLite and Edge AI/TinyML in general?

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:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by bradhilton on Tuesday July 11, 2023 @02:24PM (#36685193)
Just want to say I love Keras. Thank you for your work!
Re:Introducing Keras Core: Keras for TensorFlow, Jax, and Py... by hashtag-til on Tuesday July 11, 2023 @04:07PM (#36686557)
Thanks for helping to de-fragment a the AI ecosystem! I’ll look to get involved, test and collaborate with patches!