Skip to content

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