Skip to content

Boolean mask ops #214

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

Merged
merged 6 commits into from
Feb 23, 2021
Merged

Boolean mask ops #214

merged 6 commits into from
Feb 23, 2021

Conversation

rnett
Copy link
Contributor

@rnett rnett commented Feb 11, 2021

Adds custom ops for boolean masking (tensor[mask] and tensor[mask] = update).

Note that there is no Python equivalent of BooleanMaskUpdate, but there is in Numpy and PyTorch, so I included it.

Verified

This commit was signed with the committer’s verified signature.
rnett Ryan Nett
Signed-off-by: Ryan Nett <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
rnett Ryan Nett
Signed-off-by: Ryan Nett <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
rnett Ryan Nett
Signed-off-by: Ryan Nett <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
rnett Ryan Nett
Signed-off-by: Ryan Nett <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
rnett Ryan Nett
Signed-off-by: Ryan Nett <[email protected]>

Verified

This commit was signed with the committer’s verified signature.
rnett Ryan Nett
Signed-off-by: Ryan Nett <[email protected]>
@rnett
Copy link
Contributor Author

rnett commented Feb 11, 2021

I can't run tests locally b/c jnitensorflow in java.library.path errors, I'm guessing because snapshot builds were just fixed. The CI runs them fine though.

public Scope withNameAsSubScope(String defaultName){
return new Scope(env, nameScope.withSubScope(nameScope.makeOpName(defaultName)), controlDependencies, deviceSpec);
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

It could be interesting to update our other composite ops to make use of this new method, like this one:

Copy link
Collaborator

@karllessard karllessard left a comment

Choose a reason for hiding this comment

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

Thanks @rnett !

@karllessard karllessard merged commit 439373d into tensorflow:master Feb 23, 2021
@rnett rnett deleted the rn_boolean_mask branch October 17, 2021 00:44
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