Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removeDuplicates doesn't seem to work #19

Open
AlexisBRENON opened this issue Jul 3, 2017 · 0 comments
Open

removeDuplicates doesn't seem to work #19

AlexisBRENON opened this issue Jul 3, 2017 · 0 comments

Comments

@AlexisBRENON
Copy link
Contributor

removeDuplicates doesn't seem to remove anything...

Example:

th> x = torch.rand(1,5)
                                                                      [0.0000s]	
th> y = x:repeatTensor(5,1)
                                                                      [0.0005s]	
th> print(y)
 0.0463  0.4599  0.1440  0.2752  0.2289
 0.0463  0.4599  0.1440  0.2752  0.2289
 0.0463  0.4599  0.1440  0.2752  0.2289
 0.0463  0.4599  0.1440  0.2752  0.2289
 0.0463  0.4599  0.1440  0.2752  0.2289
[torch.DoubleTensor of size 5x5]

                                                                      [0.0005s]	
th> manifold.removeDuplicates(y)
 0.0463  0.4599  0.1440  0.2752  0.2289
 0.0463  0.4599  0.1440  0.2752  0.2289
 0.0463  0.4599  0.1440  0.2752  0.2289
 0.0463  0.4599  0.1440  0.2752  0.2289
 0.0463  0.4599  0.1440  0.2752  0.2289
[torch.DoubleTensor of size 5x5]

{
  1 : 1
  2 : 2
  3 : 3
  4 : 4
  5 : 5
}
                                                                      [0.0012s]	
th> 

As you can see, all samples of y are returned while I expect to get only one (as they are all the same).
Do I misunderstand the use of this function ?

Kind regards,
Alexis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant