-
Notifications
You must be signed in to change notification settings - Fork 214
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
Boolean mask ops #214
Conversation
Signed-off-by: Ryan Nett <[email protected]>
Signed-off-by: Ryan Nett <[email protected]>
Signed-off-by: Ryan Nett <[email protected]>
Signed-off-by: Ryan Nett <[email protected]>
Signed-off-by: Ryan Nett <[email protected]>
Signed-off-by: Ryan Nett <[email protected]>
137b0d8
to
5597981
Compare
I can't run tests locally b/c |
public Scope withNameAsSubScope(String defaultName){ | ||
return new Scope(env, nameScope.withSubScope(nameScope.makeOpName(defaultName)), controlDependencies, deviceSpec); | ||
} | ||
|
There was a problem hiding this comment.
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:
java/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Ones.java
Line 53 in ef6ece6
Scope onesScope = scope.withSubScope("Ones"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rnett !
Adds custom ops for boolean masking (
tensor[mask]
andtensor[mask] = update
).Note that there is no Python equivalent of
BooleanMaskUpdate
, but there is in Numpy and PyTorch, so I included it.