def should_accumulate(self):
    accumulation_done = self._accumulated_batches_reached()
    is_final_batch = self._num_training_batches_reached()
    return (not (accumulation_done or is_final_batch))
def should_accumulate(self):
    accumulation_done = self._accumulated_batches_reached()
    is_final_batch = self._num_training_batches_reached()
    return (not (accumulation_done or is_final_batch))