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

torch.randperm does not respect TH_INDEX_BASE #911

Closed
soumith opened this issue Mar 3, 2017 · 1 comment
Closed

torch.randperm does not respect TH_INDEX_BASE #911

soumith opened this issue Mar 3, 2017 · 1 comment
Labels
high priority module: dependency bug Problem is not caused by us, but caused by an upstream library we use

Comments

@soumith
Copy link
Member

soumith commented Mar 3, 2017

Currently, torch.randperm(10) returns

In [6]: torch.randperm(10)
Out[6]:

 2
 3
 7
 4
 9
 8
 5
 6
 1
 0
[torch.LongTensor of size 10]

This is clearly wrong and unexpected behavior. Needs to return numbers in range [1, 10]

@soumith soumith added module: dependency bug Problem is not caused by us, but caused by an upstream library we use high priority labels Mar 3, 2017
@soumith
Copy link
Member Author

soumith commented Mar 3, 2017

reluctantly closes issue

@soumith soumith closed this as completed Mar 3, 2017
zhuhong61 pushed a commit to zhuhong61/pytorch that referenced this issue Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority module: dependency bug Problem is not caused by us, but caused by an upstream library we use
Projects
None yet
Development

No branches or pull requests

1 participant