torch.Tensor.unique_consecutive¶ Tensor.unique_consecutive(return_inverse=False, return_counts=False, dim=None)[source][source]¶ 消除连续等效组中除第一个元素以外的所有元素。 参见 torch.unique_consecutive()