'Args:
param: same as in :class:`HyperParamSetter`.
schedule (list): with the format ``[(epoch1, val1), (epoch2, val2), (epoch3, val3)]``.
Each ``(ep, val)`` pair means to set the param
to "val" __after__ the completion of epoch `ep`.
If ep == 0, the value will be set before the first epoch
(by default the first is epoch 1).
interp: None: no interpolation. \'linear\': linear interpolation
Example:
.. code-block:: python
ScheduledHyperParamSetter(\'learning_rate\',
[(30, 1e-2), (60, 1e-3), (85, 1e-4), (95, 1e-5)]),'

def __init__(self, param, schedule, interp=None):

    schedule = [(int(a), float(b)) for (a, b) in schedule]
    self.schedule = sorted(schedule, key=operator.itemgetter(0))
    if (interp is not None):
        assert (interp == 'linear')
    self.interp = interp
    super(ScheduledHyperParamSetter, self).__init__(param)
