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.
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 tensorMwhich is the same shape asT, with boolean elements such that a particular element ofMis true if the corresponding element ofTsatisfies some condition. I can get the same effect withapply_ewise, but with substantially greater memory cost.