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

Convert to Keras Core: Token Learner #528

Merged
merged 5 commits into from
Jul 18, 2023

Conversation

anas-rz
Copy link
Contributor

@anas-rz anas-rz commented Jul 18, 2023

Update imports
Remove TensorFlow Addons Dependency
remove tensorflow operations/activations to keras_core.ops
change checkpoint name.
Attached git-diff/
tokenlearner_keras_core.diff.txt
Colab Notebook

@google-cla
Copy link

google-cla bot commented Jul 18, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Contributor

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! As far as I can tell this is backend agnostic (only TF data is used) so we can move it to the backend agnostic folder.

"""
Title: Learning to tokenize in Vision Transformers
Authors: [Aritra Roy Gosthipaty](https://twitter.com/ariG23498), [Sayak Paul](https://twitter.com/RisingSayak) (equal contribution)
Converted to Keras Core: [Muhammad Anas Raza](https://anasrz.com)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add "by"

import keras_core as keras
from keras_core import layers
from keras_core import ops
import tensorflow as tf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only tf.data is used so prefer doing from tensorflow import data as tf_data to make it clear there's no other TF dependency.

Copy link
Contributor

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the file to the backend agnostic folder.

@anas-rz
Copy link
Contributor Author

anas-rz commented Jul 18, 2023

Done.

Copy link
Contributor

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@fchollet fchollet merged commit 5ad3406 into keras-team:main Jul 18, 2023
@anas-rz anas-rz deleted the token_learner_keras_core branch July 19, 2023 21:01
adi-kmt pushed a commit to adi-kmt/keras-core that referenced this pull request Jul 21, 2023
* Create token_learner.py

* Change tf_data and fix typos

* typo

* Fix Typo

* move to backend_agnostic
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.

None yet

2 participants