for anyone reading, turns out there is an undocumented dim arg that can be passed to the unique funciton:

  
      github.com/pytorch/pytorch
  
  
      
    
  


  Adds `dim` argument to `torch.unique`



  by ptrblck
  on 10:28PM - 10 Aug 18



  13 commits
  changed 6 files
  with 273 additions
  and 9 deletions.


  
  
    
    
  
  


https://pytorch.org/docs/stable/_modules/torch/functional.html#unique 15