gammagl.utils.index_to_mask

class index_to_mask(index, size: int | None = None)[source]

Converts indices to a mask representation.

Parameters:
  • index (tensor) – The indices.

  • size (int, optional) – The size of the mask. If set to None, a minimal sized output mask is returned.