title: Pytorch Change the learning rate based on number of epochs
body: <p>When I set the learning rate and find the accuracy cannot increase after training few epochs</p>
  <pre><code>optimizer = optim.Adam(model.parameters(), lr = 1e-4)
  
  n_epochs = 10
  for i in range(n_epochs):
  
      // some training here
  </code></pre>
  <p>If I want to use a step decay: reduce the learning rate by a factor of 10 every 5 epochs, how can I do so?</p>