title: pytorch - connection between loss.backward() and optimizer.step()
body: <p>Where is an explicit connection between the <code>optimizer</code> and the <code>loss</code>? </p>
  
  <p>How does the optimizer know where to get the gradients of the loss without a call liks this <code>optimizer.step(loss)</code>?</p>
  
  <p>-More context-</p>
  
  <p>When I minimize the loss, I didn't have to pass the gradients to the optimizer.</p>
  
  <pre><code>loss.backward() # Back Propagation
  optimizer.step() # Gardient Descent
  </code></pre>