'Args:
max_to_keep, keep_checkpoint_every_n_hours(int): the same as in ``tf.train.Saver``.
checkpoint_dir (str): Defaults to ``logger.LOG_DIR``.
var_collections (str or list of str): collection of the variables (or list of collections) to save.'

def __init__(self, max_to_keep=10, keep_checkpoint_every_n_hours=0.5, checkpoint_dir=None, var_collections=tf.GraphKeys.GLOBAL_VARIABLES, keep_recent=None, keep_freq=None):

    self._max_to_keep = max_to_keep
    self._keep_every_n_hours = keep_checkpoint_every_n_hours
    if ((keep_recent is not None) or (keep_freq is not None)):
        log_deprecated('ModelSaver(keep_recent=,    keep_freq=)', 'Use    max_to_keep    and    keep_checkpoint_every_n_hours!')
        if (keep_recent is not None):
            self._max_to_keep = keep_recent
        if (keep_freq is not None):
            self._keep_every_n_hours = keep_freq
    if (not isinstance(var_collections, list)):
        var_collections = [var_collections]
    self.var_collections = var_collections
    if (checkpoint_dir is None):
        checkpoint_dir = logger.LOG_DIR
    assert (checkpoint_dir is not None)
    assert tf.gfile.IsDirectory(checkpoint_dir), checkpoint_dir
    self.checkpoint_dir = checkpoint_dir
