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

Binary masks? #77

Open
ryanmrichard opened this issue Jul 15, 2019 · 1 comment
Open

Binary masks? #77

ryanmrichard opened this issue Jul 15, 2019 · 1 comment
Labels
question Further information is requested

Comments

@ryanmrichard
Copy link
Member

Maybe I missed it, but is it possible to generate a binary-mask for a tensor? Basically given a tensor T, I want to generate a tensor M which is the same shape as T, with boolean elements such that a particular element of M is true if the corresponding element of T satisfies some condition. I can get the same effect with apply_ewise, but with substantially greater memory cost.

@ryanmrichard ryanmrichard added the question Further information is requested label Jul 15, 2019
@erdalmutlu
Copy link
Contributor

This can be implemented via a utility function which kind of does a screening over the input tensor and generate a boolean tensor for the corresponding mask. I will keep it as a to-do item if we still have a use-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants