YujiaBao / Distributional-Signatures

"Few-shot Text Classification with Distributional Signatures" ICLR 2020
https://arxiv.org/abs/1908.06039
MIT License
254 stars 57 forks source link

This line seems to be redundant #9

Closed GeneZC closed 4 years ago

GeneZC commented 4 years ago

https://github.com/YujiaBao/Distributional-Signatures/blob/e04970ff6399d34d439bc128fdd5b66d0eb49592/src/classifier/base.py#L81

An example from pytorch doc:

output, inverse_indices = torch.unique( torch.tensor([1, 3, 2, 3], dtype=torch.long), sorted=True, return_inverse=True) output tensor([ 1, 2, 3]) inverse_indices tensor([ 0, 2, 1, 2])

YujiaBao commented 4 years ago

Thank you for pointing that out.