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 · 3 comments
Open

Support for TF 2.16.0 #97

daspk04 opened this issue Mar 5, 2024 · 3 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 ?

@vidlb
Copy link
Contributor

vidlb commented Nov 4, 2024

Hi @daspk04 , I've pushed releases candidate images of OTBTF including TF 2.18 and OTB 9.1.
We still need to update some python scripts to Keras 3, but if you already wanna try something with otb apps you may use one of the following images :

  • registry.forgemia.inra.fr/orfeo-toolbox/otbtf:4.4.0-rc1-cpu
  • registry.forgemia.inra.fr/orfeo-toolbox/otbtf:4.4.0-rc1-gpu

I've made a lot of changes in the build process, and hope I didn't break anything in the TF install, thus any feedback would be much appreciated !

Cheers

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

3 participants