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

Support for TF 2.16.0 #97

Open
daspk04 opened this issue Mar 5, 2024 · 2 comments
Open

Support for TF 2.16.0 #97

daspk04 opened this issue Mar 5, 2024 · 2 comments

Comments

@daspk04
Copy link
Contributor

daspk04 commented Mar 5, 2024

Hi @remicres !

The last week tensorflow released the 2.16.0-rc version. One interesting point is that Keras 3 will be the default version. Keras 3 seems quite interesting, it supports multi framework (tesorflow, pytorch, jax).

Use data pipelines from any source. The Keras 3 fit()/evaluate()/predict() routines are compatible with tf.data.Dataset objects, with PyTorch DataLoader objects, with NumPy arrays, Pandas dataframes — regardless of the backend you're using. You can train a Keras 3 + TensorFlow model on a PyTorch DataLoader or train a Keras 3 + PyTorch model on a tf.data.Dataset.

So then I'm assuming that we would be able to run directly any model written in pytorch with OTBTF as well?

@remicres
Copy link
Owner

remicres commented Mar 5, 2024

Hi @Pratyush1991 ,

It looks like, yes... thanks for the information, I have to dig into that. If somebody would be kind enough to provide us a minimal working example, it would be so great.

Like

  • train a pytorch model from otbtf.dataset
  • perform an inference from a SavedModel created from a trained pytorch model
  • ...

@daspk04
Copy link
Contributor Author

daspk04 commented Mar 7, 2024

Thanks @remicres!

I might be able do it. At-least based on current OTBTF version:

  • I can create a simple pytorch model which would just be trained based the patches! Actually tfrecords should work as well as TorchData supports it. c.f
  • Possibly then that model can be tested with TF 2.16.0 ?

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