Skip to content
← All tracks

Autograd Mechanics

PyTorch

The graph as an object you can inspect. Leaves, `grad_fn`, accumulation, and the exact difference between `no_grad` and `detach` — measured by counting the nodes each one does or does not build.

0 / 8 solved
  1. 1. Not solved yet. The graph you never needed
  2. 2. Not solved yet. The gradient from last time
  3. 3. Not solved yet. Backward from a vector
  4. 4. Not solved yet. Your own backward pass
  5. 5. Not solved yet. Backward twice
  6. 6. Not solved yet. The value backward needed
  7. 7. Not solved yet. Walk the graph
  8. 8. Not solved yet. Faster than no_grad, and one-way

Check yourself

4 questions · one attempt each

These do not count toward finishing the track. They are here to catch the things that are easy to read past.

0 / 4

Calling backward() twice on the *same* graph raises. Why, and what is the fix?

y = (x * 2).sum()
y.backward()
y.backward()   # ?
Question 1 of 4