started autograd tutorial
This commit is contained in:
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
import torch
|
||||
x = torch.ones(2,2, requires_grad=True)
|
||||
print(x)
|
||||
|
||||
y = x + 2
|
||||
|
||||
print(y.grad_fn)
|
||||
Reference in New Issue
Block a user