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

Random Swap Layer #224

Merged
merged 27 commits into from
Sep 1, 2022
Merged

Random Swap Layer #224

merged 27 commits into from
Sep 1, 2022

Conversation

aflah02
Copy link
Collaborator

@aflah02 aflah02 commented Jun 14, 2022

Fixes #223
@mattdangerw @chenmoneygithub I believe the PR is ready for review!

Copy link
Member

@mattdangerw mattdangerw left a comment

Choose a reason for hiding this comment

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

Let's do some updates here based on our changes to RandomDeletion.

keras_nlp/layers/random_swaps.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swap_test.py Show resolved Hide resolved
keras_nlp/layers/random_swaps.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swaps.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swaps.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swaps.py Outdated Show resolved Hide resolved
Copy link
Member

@mattdangerw mattdangerw left a comment

Choose a reason for hiding this comment

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

Just a quick pass. I still think this needs updates to make it resemble the random deletion API.

keras_nlp/layers/random_swaps.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swaps.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swap_test.py Outdated Show resolved Hide resolved
@aflah02 aflah02 changed the title Random Swaps Layer Random Swap Layer Aug 11, 2022
Copy link
Member

@mattdangerw mattdangerw left a comment

Choose a reason for hiding this comment

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

Thank you! API is looking good. Just some more detail oriented comments.

keras_nlp/layers/random_swap.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swap.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swap.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swap.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swap.py Show resolved Hide resolved
keras_nlp/layers/random_swap_test.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swap_test.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swap_test.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swap_test.py Outdated Show resolved Hide resolved
keras_nlp/layers/random_swap.py Outdated Show resolved Hide resolved
Copy link
Member

@mattdangerw mattdangerw left a comment

Choose a reason for hiding this comment

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

I think this is close! But I still see some unaddressed comments on the diff from the last review, and have a suggestion for the positions tensor I still think we can make that simpler.

keras_nlp/layers/random_swap.py Outdated Show resolved Hide resolved
Copy link
Member

@mattdangerw mattdangerw left a comment

Choose a reason for hiding this comment

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

LGTM! Just one last comment.

keras_nlp/layers/random_swap.py Outdated Show resolved Hide resolved
Copy link
Member

@mattdangerw mattdangerw left a comment

Choose a reason for hiding this comment

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

Thanks you!

@mattdangerw mattdangerw merged commit b88ff1b into keras-team:master Sep 1, 2022
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.

Random Swaps - Data Augmentation
2 participants