Skip to content
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

Update tensors and autograd #1185

Merged
merged 17 commits into from
Dec 30, 2020
Prev Previous commit
Next Next commit
Fix import
  • Loading branch information
subramen committed Oct 14, 2020
commit cd6f97ac7a7720d4dd7d372f8d07cd6125cec871
3 changes: 3 additions & 0 deletions beginner_source/blitz/autograd_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#

import torch

a = torch.tensor([2., 3.], requires_grad=True)
b = torch.tensor([6., 4.], requires_grad=True)

Expand Down Expand Up @@ -243,6 +244,8 @@
#

import torchvision
from torch import nn, optim

model = torchvision.models.resnet18(pretrained=True)

for param in model.parameters():
Expand Down