Open fredpolicarpo opened 6 years ago
I really don't get why everyone is still using Variable. It's deprefuckingcated :laughing:
The class
torch.autograd.Variable
is deprecated.This line must be updated to
w = torch.tensor([1.0], requires_grad=True) # Any random value
Thanks for the update. It is funny when I code in PyCharm because the IDE suggests the 'w = torch.tensor([1.0], requires_grad=True)' is discouraged...
https://github.com/hunkim/PyTorchZeroToAll/blob/edd7ba1f19a8d2e74188d6caf6b020dc20130e53/03_auto_gradient.py#L7
The class
torch.autograd.Variable
is deprecated.This line must be updated to
w = torch.tensor([1.0], requires_grad=True) # Any random value