osc.utils.ravel_multi_index_tf
- ravel_multi_index_tf(multi_index: Tuple[tensorflow.python.framework.ops.Tensor, ...], dims: Tuple[int, ...]) tensorflow.python.framework.ops.Tensor [source]
Same as :func:
np.ravel_multi_index
with no checks.- Parameters
Example
How to use:
>>> ravel_multi_index_tf( >>> ( >>> tf.constant([4, 3, 3, 2]), >>> tf.constant([0, 1, 5, 6]), >>> tf.constant([0, 1, 2, 0]), >>> ), >>> dims=(5, 7, 3) >>> ) [84, 67, 80, 60]
- Return type
Tensor
- Returns
A 1D tensor of flat indexes.