def row_col_channel_indices_from_flattened_indices(indices, num_cols, num_channels):
    'Computes row, column and channel indices from flattened indices.\n\n  Args:\n    indices: An integer tensor of any shape holding the indices in the flattened\n      space.\n    num_cols: Number of columns in the image (width).\n    num_channels: Number of channels in the image.\n\n  Returns:\n    row_indices: The row indices corresponding to each of the input indices.\n      Same shape as indices.\n    col_indices: The column indices corresponding to each of the input indices.\n      Same shape as indices.\n    channel_indices. The channel indices corresponding to each of the input\n      indices.\n\n  '
    row_indices = ((indices // num_channels) // num_cols)
    col_indices = ((indices // num_channels) % num_cols)
    channel_indices = (indices % num_channels)
    return (row_indices, col_indices, channel_indices)
Computes row, column and channel indices from flattened indices.

Args:
  indices: An integer tensor of any shape holding the indices in the flattened
    space.
  num_cols: Number of columns in the image (width).
  num_channels: Number of channels in the image.

Returns:
  row_indices: The row indices corresponding to each of the input indices.
    Same shape as indices.
  col_indices: The column indices corresponding to each of the input indices.
    Same shape as indices.
  channel_indices. The channel indices corresponding to each of the input
    indices.
def row_col_channel_indices_from_flattened_indices(indices, num_cols, num_channels):
    'Computes row, column and channel indices from flattened indices.\n\n  Args:\n    indices: An integer tensor of any shape holding the indices in the flattened\n      space.\n    num_cols: Number of columns in the image (width).\n    num_channels: Number of channels in the image.\n\n  Returns:\n    row_indices: The row indices corresponding to each of the input indices.\n      Same shape as indices.\n    col_indices: The column indices corresponding to each of the input indices.\n      Same shape as indices.\n    channel_indices. The channel indices corresponding to each of the input\n      indices.\n\n  '
    row_indices = ((indices // num_channels) // num_cols)
    col_indices = ((indices // num_channels) % num_cols)
    channel_indices = (indices % num_channels)
    return (row_indices, col_indices, channel_indices)