Converts a mask to an index representation
(functional name: mask_to_index).
Parameters:
attrs (str, [str], optional) – If given, will only perform mask to index
conversion for the given attributes. If omitted, will infer the
attributes from the suffix _mask (default: None)
replace (bool, optional) – if set to True replaces the mask
attributes with index tensors. (default: False)