StepLR

Contents

StepLR#

class brainpy.optim.StepLR(lr, step_size, gamma=0.1, last_epoch=-1)[source]#

Decays the learning rate of each parameter group by gamma every step_size epochs.

Parameters:
  • lr (float) – Initial learning rate.

  • step_size (int) – Period of learning rate decay.

  • gamma (float) – Multiplicative factor of learning rate decay. Default: 0.1.

  • last_epoch (int) – The index of last epoch. Default: -1.