Skip to content

Add torch.func tutorials for PyTorch 2.0 #2171

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 2 commits into from
Mar 15, 2023
Merged

Add torch.func tutorials for PyTorch 2.0 #2171

merged 2 commits into from
Mar 15, 2023

Conversation

zou3519
Copy link
Contributor

@zou3519 zou3519 commented Jan 13, 2023

As the final step of integrating functorch into PyTorch, we have move the functorch APIs from under functorch.* to torch.func.* and made some adjustments to them.

This PR moves the relevant functorch tutorials from the functorch docs (https://pytorch.org/functorch/stable/) to pytorch/tutorials. We moved four tutorials:

  • Jacobians, Hessians, hvp, vhp, and more
  • Model ensembling
  • per-sample-gradients
  • Neural Tangent Kernels.

We also rewrite the tutorials to use the torch.func.* APIs instead of the functorch APIs, and excised mentions of functorch where appropriate.

Test Plan:

  • view preview (is that possible for tutorials?)

@zou3519 zou3519 force-pushed the functorch_tutorials branch from 873b891 to 839bb47 Compare January 17, 2023 14:20
@svekars svekars changed the base branch from main to 2.0-RC-TEST February 24, 2023 22:21
@svekars svekars force-pushed the functorch_tutorials branch from 839bb47 to 0d92d60 Compare February 24, 2023 22:21
@svekars
Copy link
Contributor

svekars commented Feb 24, 2023

rebased to 2.0-RC-TEST branch

@svekars svekars changed the base branch from 2.0-RC-TEST to main March 15, 2023 16:08
As the final step of integrating functorch into PyTorch, we have move
the functorch APIs from under functorch.* to torch.func.* and made some
adjustments to them.

This PR moves the relevant functorch tutorials from the functorch docs
(https://pytorch.org/functorch/stable/) to pytorch/tutorials. We moved
four tutorials:
- Jacobians, Hessians, hvp, vhp, and more
- Model ensembling
- per-sample-gradients
- Neural Tangent Kernels.

We also rewrite the tutorials to use the torch.func.* APIs instead of
the functorch APIs, and excised mentions of functorch where appropriate.

Test Plan:
- view preview (is that possible for tutorials?)
@svekars svekars force-pushed the functorch_tutorials branch from 0d92d60 to 2cb5217 Compare March 15, 2023 16:22
@netlify
Copy link

netlify bot commented Mar 15, 2023

Deploy Preview for pytorch-tutorials-preview ready!

Name Link
🔨 Latest commit f7bd8ef
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/64122008711229000875a560
😎 Deploy Preview https://deploy-preview-2171--pytorch-tutorials-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@malfet malfet merged commit 9d9be8f into main Mar 15, 2023
@malfet malfet deleted the functorch_tutorials branch March 15, 2023 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants