Skip to content

Fix arange in blitz tutorial #273

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

Merged
merged 1 commit into from
Jul 18, 2018
Merged

Fix arange in blitz tutorial #273

merged 1 commit into from
Jul 18, 2018

Conversation

zou3519
Copy link
Contributor

@zou3519 zou3519 commented Jul 17, 2018

In the tutorial,
torch.arange is being used as a FloatTensor. This behavior was changed
in pytorch/pytorch#7016 to return a LongTensor.
I removed the torch.arange usage and instead construct a tensor with
torch.randn

cc @ssnl

In [the tutorial](https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html),
`torch.arange` is being used as a FloatTensor. This behavior was changed
in pytorch/pytorch#7016 to return a LongTensor.
I removed the `torch.arange` usage and instead construct a tensor with
`torch.randn`
@zou3519 zou3519 changed the title Fix arange in docs. Fix arange in blitz tutorial Jul 17, 2018
Copy link
Contributor

@ssnl ssnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!!

@soumith soumith merged commit a1d4e62 into pytorch:master Jul 18, 2018
rodrigo-techera pushed a commit to Experience-Monks/tutorials that referenced this pull request Nov 29, 2021
In [the tutorial](https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html),
`torch.arange` is being used as a FloatTensor. This behavior was changed
in pytorch/pytorch#7016 to return a LongTensor.
I removed the `torch.arange` usage and instead construct a tensor with
`torch.randn`
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

Successfully merging this pull request may close these issues.

3 participants