torch.unique_consecutive
torch.unique_consecutive(args, *kwargs)
Eliminates all but the first element from every consecutive group
   of equivalent elements.
Note:
 This function is different from "torch.unique()" in the sense
 that this function only eliminates consecutive duplicate values.
 This semantics is similar to *std::unique* in C++.

Parameters:
      * input (Tensor) -- the input tensor
  * **return_inverse** (*bool*) -- Whether to also return the
    indices for where elements in the original input ended up in
    the returned unique list.

  * **return_counts** (*bool*) -- Whether to also return the
    counts for each unique element.

  * **dim** (*int*) -- the dimension to apply unique. If "None",
    the unique of the flattened input is returned. default: "None"

Returns:
      A tensor or a tuple of tensors containing
     * **output** (*Tensor*): the output list of unique scalar
