Getting this error my self in https://github.com/ultralytics/yolov3 9. The band-aid ‘solution’ was to define the attribute after the scheduler is already defined. I’m not sure if the scheduler is actually properly initialized to the correct LR, but the code runs without errors in the second example below:
    # ERROR
    scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=lf, last_epoch=start_epoch - 1)

    # NO ERROR
    scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=lf)
    scheduler.last_epoch = start_epoch - 1

Original error message is:
Traceback (most recent call last):
  File "train.py", line 423, in <module>
    train()  # train normally
  File "train.py", line 152, in train
    scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=lf, last_epoch=start_epoch - 1)
  File "/usr/local/lib/python3.6/dist-packages/torch/optim/lr_scheduler.py", line 189, in __init__
    super(LambdaLR, self).__init__(optimizer, last_epoch)
  File "/usr/local/lib/python3.6/dist-packages/torch/optim/lr_scheduler.py", line 41, in __init__
    "in param_groups[{}] when resuming an optimizer".format(i))
KeyError: "param 'initial_lr' is not specified in param_groups[0] when resuming an optimizer"