torch.functional.unravel_index
- torch.functional.unravel_index(indices, shape)
Converts a tensor of flat indices into a tuple of coordinate tensors that index into an arbitrary tensor of the specified shape.
- Parameters:
indices (Tensor) – An integer tensor containing indices into the flattened version of an arbitrary tensor of shape . All elements must be in the range .