def learning_rate_schedule(current_epoch, current_batch, steps_per_epoch, batch_size):
    'Handles linear scaling rule, gradual warmup, and LR decay.\n\n  Scale learning rate at epoch boundaries provided in LR_SCHEDULE by the\n  provided scaling factor.\n\n  Args:\n    current_epoch: integer, current epoch indexed from 0.\n    current_batch: integer, current batch in the current epoch, indexed from 0.\n    steps_per_epoch: integer, number of steps in an epoch.\n    batch_size: integer, total batch sized.\n\n  Returns:\n    Adjusted learning rate.\n  '
    initial_lr = ((BASE_LEARNING_RATE * batch_size) / 256)
    epoch = (current_epoch + (float(current_batch) / steps_per_epoch))
    (warmup_lr_multiplier, warmup_end_epoch) = LR_SCHEDULE[0]
    if (epoch < warmup_end_epoch):
        return (((initial_lr * warmup_lr_multiplier) * epoch) / warmup_end_epoch)
    for (mult, start_epoch) in LR_SCHEDULE:
        if (epoch >= start_epoch):
            learning_rate = (initial_lr * mult)
        else:
            break
    return learning_rate
Handles linear scaling rule, gradual warmup, and LR decay.

Scale learning rate at epoch boundaries provided in LR_SCHEDULE by the
provided scaling factor.

Args:
  current_epoch: integer, current epoch indexed from 0.
  current_batch: integer, current batch in the current epoch, indexed from 0.
  steps_per_epoch: integer, number of steps in an epoch.
  batch_size: integer, total batch sized.

Returns:
  Adjusted learning rate.
def learning_rate_schedule(current_epoch, current_batch, steps_per_epoch, batch_size):
    'Handles linear scaling rule, gradual warmup, and LR decay.\n\n  Scale learning rate at epoch boundaries provided in LR_SCHEDULE by the\n  provided scaling factor.\n\n  Args:\n    current_epoch: integer, current epoch indexed from 0.\n    current_batch: integer, current batch in the current epoch, indexed from 0.\n    steps_per_epoch: integer, number of steps in an epoch.\n    batch_size: integer, total batch sized.\n\n  Returns:\n    Adjusted learning rate.\n  '
    initial_lr = ((BASE_LEARNING_RATE * batch_size) / 256)
    epoch = (current_epoch + (float(current_batch) / steps_per_epoch))
    (warmup_lr_multiplier, warmup_end_epoch) = LR_SCHEDULE[0]
    if (epoch < warmup_end_epoch):
        return (((initial_lr * warmup_lr_multiplier) * epoch) / warmup_end_epoch)
    for (mult, start_epoch) in LR_SCHEDULE:
        if (epoch >= start_epoch):
            learning_rate = (initial_lr * mult)
        else:
            break
    return learning_rate