pytorch / pytorch/pytorch.github.io
Parameters of a model after .cuda() will be different objects with those before the call?
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 285
- Forks
- 317
- PR merge metrics
- No merged PRs in 30d
Description
📚 Documentation
(Add a clear and concise description of what the documentation content issue is. A link to any relevant https://pytorch.org page is helpful if you have one.)
As i know .cuda() is inplace operator, so will be same objects after .cuda() call. Did i miss something?
https://pytorch.org/docs/stable/optim.html
"If you need to move a model to GPU via .cuda(), please do so before constructing optimizers for it. Parameters of a model after .cuda() will be different objects with those before the call.
In general, you should make sure that optimized parameters live in consistent locations when optimizers are constructed and used."
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked PyTorch optimizer documentation and investigate the .cuda() behavior raised in the issue. Done means the documentation clearly explains whether parameter objects change and how that relates to constructing optimizers.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100