'Args:
triggerable (Callback): a Callback instance with a _trigger method to be called.
every_k_steps (int): trigger when ``global_step % k == 0``. Set to
None to disable.
every_k_epochs (int): trigger when ``epoch_num % k == 0``. Set to
None to disable.
every_k_steps and every_k_epochs can be both set, but cannot be both NOne.'

def __init__(self, triggerable, every_k_steps=None, every_k_epochs=None):

    assert isinstance(triggerable, Callback), type(triggerable)
    super(PeriodicTrigger, self).__init__(triggerable)
    assert ((every_k_epochs is not None) or (every_k_steps is not None)), 'every_k_steps    and    every_k_epochs    cannot    be    both    None!'
    self._step_k = every_k_steps
    self._epoch_k = every_k_epochs
