text: Title: Where is internal state used in train_2d
  Body: In `train_2d` defined in [gd](https://github.com/d2l-ai/d2l-en/blob/master/chapter_optimization/gd.md),  it says `s1` and `s2` are internal state variables that will be used later, but where exactly are those variable used are not clear, even after reading the following sections. 
  
  Perhaps it is better to put a reference in the comments, since it is confusing whether the internal states will be used in the same section later or in the same chapter later.  
  
  ```
  def train_2d(trainer, steps=20, f_grad=None):  #@save
      """Optimize a 2D objective function with a customized trainer."""
      # `s1` and `s2` are internal state variables that will be used later
      x1, x2, s1, s2 = -5, -2, 0, 0
      results = [(x1, x2)]
      for i in range(steps):
          if f_grad:
              x1, x2, s1, s2 = trainer(x1, x2, s1, s2, f_grad)
          else:
              x1, x2, s1, s2 = trainer(x1, x2, s1, s2)
          results.append((x1, x2))
      print(f'epoch {i + 1}, x1: {float(x1):f}, x2: {float(x2):f}')
      return results
  ```