Mask tensor along dimension 0 with a 1-D mask.
(reshaped_tensor, mask, axis=None)
| 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") |
no test coverage detected