MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _apply_mask_1d

Function _apply_mask_1d

tensorflow/python/ops/array_ops.py:1473–1476  ·  view source on GitHub ↗

Mask tensor along dimension 0 with a 1-D mask.

(reshaped_tensor, mask, axis=None)

Source from the content-addressed store, hash-verified

1471 """
1472
1473 def _apply_mask_1d(reshaped_tensor, mask, axis=None):
1474 """Mask tensor along dimension 0 with a 1-D mask."""
1475 indices = squeeze(where(mask), axis=[1])
1476 return gather(reshaped_tensor, indices, axis=axis)
1477
1478 with ops.name_scope(name, values=[tensor, mask]):
1479 tensor = ops.convert_to_tensor(tensor, name="tensor")

Callers 1

boolean_maskFunction · 0.85

Calls 3

squeezeFunction · 0.70
whereFunction · 0.70
gatherFunction · 0.70

Tested by

no test coverage detected