MCPcopy Create free account
hub / github.com/benoitsteiner/tensorflow-opencl / boolean_mask

Function boolean_mask

tensorflow/python/ops/array_ops.py:1108–1175  ·  view source on GitHub ↗

Apply boolean mask to tensor. Numpy equivalent is `tensor[mask]`. ```python # 1-D example tensor = [0, 1, 2, 3] mask = np.array([True, False, True, False]) boolean_mask(tensor, mask) # [0, 2] ``` In general, `0 < dim(mask) = K <= dim(tensor)`, and `mask`'s shape must match the fi

(tensor, mask, name="boolean_mask")

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 10

_apply_mask_1dFunction · 0.85
name_scopeMethod · 0.80
shapeFunction · 0.70
concatFunction · 0.70
reshapeFunction · 0.50
get_shapeMethod · 0.45
num_elementsMethod · 0.45
set_shapeMethod · 0.45
concatenateMethod · 0.45

Tested by

no test coverage detected