tensorflow_mri.ravel_multi_index
tensorflow_mri.ravel_multi_index¶
- ravel_multi_index(multi_indices, dims)[source]¶
Converts an array of multi-indices into an array of flat indices.
- Parameters
multi_indices – A
Tensor
of shape[..., N]
containing multi-indices into anN
-dimensional tensor.dims – A
Tensor
of shape[N]
. The shape of the tensor thatmulti_indices
indexes into.
- Returns
A
Tensor
of shape[...]
containing flat indices equivalent tomulti_indices
.