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

Migrating ViViT to Keras-3 #1724

Merged
merged 3 commits into from
Jan 16, 2024
Merged

Migrating ViViT to Keras-3 #1724

merged 3 commits into from
Jan 16, 2024

Conversation

aditya02shah
Copy link
Contributor

This PR migrates the ViViT example to Keras 3.0 as requested in keras-team/keras-cv#2211 and includes the following changes:

  1. Replacing Tensorflow operations with their equivalent Keras ops in the preprocess function.

  2. Reshaping of the tensor before saving to a GIF, to resolve the issue characterized by the error message TypeError: Cannot handle this data type: (1, 1, 1), |u1

@divyashreepathihalli
Copy link
Contributor

divyashreepathihalli commented Jan 11, 2024

@aditya02shah Thanks for the PR! If the example is using Tensorflow only for tf.data, this will be a keras 3 example. You can remove setting the backend line os.environ["KERAS_BACKEND"] = "tensorflow".
Also, Please generate the .ipynb and .md file. Here is how you do it - from keras-io/scripts/ run python autogen.py add_example ../examples/vision/python_file_name

@aditya02shah aditya02shah changed the title Migrating ViViT to Keras-3[TF-Only Backend] Migrating ViViT to Keras-3 Jan 13, 2024
@aditya02shah
Copy link
Contributor Author

@divyashreepathihalli I have made the necessary changes and generated the .ipynb and .md files!

@fchollet fchollet merged commit 8248d63 into keras-team:master Jan 16, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

4 participants