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

target size #3

Open
xysong1201 opened this issue Jan 25, 2019 · 1 comment
Open

target size #3

xysong1201 opened this issue Jan 25, 2019 · 1 comment

Comments

@xysong1201
Copy link

Hi, ptrblck, I don't know why your target tensor the final dimension is a tuple. could you explain
y = torch.randint(0, nb_classes, (1, 96, 96))

@ptrblck
Copy link
Owner

ptrblck commented Feb 1, 2019

torch.randint expects arguments as low, high, size, out, ....
Since I wanted to sample random integers in [0, nb_classes-1] in the shape [1, 96, 96], I had to pass it this way. Otherwise, the 96 might be understood as the out argument.

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

2 participants