def __init__(self, batch_size, epoch_size, warmup_epochs, boundaries, multipliers, compute_lr_on_cpu=True, name=None):
    super(PiecewiseConstantDecayWithWarmup, self).__init__()
    if (len(boundaries) != (len(multipliers) - 1)):
        raise ValueError('The length of boundaries must be 1 less than the length of multipliers')
    base_lr_batch_size = 256
    steps_per_epoch = (epoch_size // batch_size)
    self.rescaled_lr = ((BASE_LEARNING_RATE * batch_size) / base_lr_batch_size)
    self.step_boundaries = [(float(steps_per_epoch) * x) for x in boundaries]
    self.lr_values = [(self.rescaled_lr * m) for m in multipliers]
    self.warmup_steps = (warmup_epochs * steps_per_epoch)
    self.compute_lr_on_cpu = compute_lr_on_cpu
    self.name = name
    self.learning_rate_ops_cache = {}
def __init__(self, batch_size, epoch_size, warmup_epochs, boundaries, multipliers, compute_lr_on_cpu=True, name=None):
    super(PiecewiseConstantDecayWithWarmup, self).__init__()
    if (len(boundaries) != (len(multipliers) - 1)):
        raise ValueError('The length of boundaries must be 1 less than the length of multipliers')
    base_lr_batch_size = 256
    steps_per_epoch = (epoch_size // batch_size)
    self.rescaled_lr = ((BASE_LEARNING_RATE * batch_size) / base_lr_batch_size)
    self.step_boundaries = [(float(steps_per_epoch) * x) for x in boundaries]
    self.lr_values = [(self.rescaled_lr * m) for m in multipliers]
    self.warmup_steps = (warmup_epochs * steps_per_epoch)
    self.compute_lr_on_cpu = compute_lr_on_cpu
    self.name = name
    self.learning_rate_ops_cache = {}