Skip to content

Fix #3186 - create leaf/non-leaf/requires_grad/retain_grad tutorial #3492

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

j-silv
Copy link

@j-silv j-silv commented Jul 25, 2025

This was originally bundled with PR #3389, but now broken into two separate tutorials after discussing with PyTorch team.

Fixes #3186

Description

Add a tutorial which goes over the subtleties of leaf, non-leaf, and requires_grad vs. retain_grad

Link to preview is here (wait for docs to build it):

Checklist

  • The issue that is being fixed is referred in the description (see above "Fixes #ISSUE_NUMBER")
  • Only one issue is addressed in this pull request
  • Labels from the issue that this PR is fixing are added to this pull request
  • No unnecessary issues are included into this pull request.

Copy link

pytorch-bot bot commented Jul 25, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3492

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 3c181eb with merge base b5637fa (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@github-actions github-actions bot added advanced docathon-h1-2025 A label for the docathon in H1 2025 hard hard label for docathon tutorial-proposal labels Jul 25, 2025
@j-silv j-silv force-pushed the 3186-leaf-nonleaf-tutorial branch from 14255e0 to e2e0d01 Compare July 25, 2025 02:35
@svekars
Copy link
Contributor

svekars commented Jul 25, 2025

cc: @soulitzer

…orial

This was originally bundled with PR pytorch#3389, but now broken into two
separate tutorials after discussing with PyTorch team.
@j-silv j-silv force-pushed the 3186-leaf-nonleaf-tutorial branch from e2e0d01 to 3c181eb Compare July 25, 2025 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced cla signed docathon-h1-2025 A label for the docathon in H1 2025 hard hard label for docathon tutorial-proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Writing a gradient tutorial, focused on leaf vs non leaf tensors.
3 participants