def save_ckpt(<EOL>sess=None, mode_name='<STR_LIT>', save_dir='<STR_LIT>', var_list=None, global_step=None, printable=False<EOL>):
if sess is None:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if var_list is None:<EOL><INDENT>var_list = []<EOL><DEDENT>ckpt_file = os.path.join(save_dir, mode_name)<EOL>if var_list == []:<EOL><INDENT>var_list = tf.global_variables()<EOL><DEDENT>logging.info("<STR_LIT>" % (ckpt_file, len(var_list)))<EOL>if printable:<EOL><INDENT>for idx, v in enumerate(var_list):<EOL><INDENT>logging.info("<STR_LIT>".format(idx, v.name, str(v.get_shape())))<EOL><DEDENT><DEDENT>saver = tf.train.Saver(var_list)<EOL>saver.save(sess, ckpt_file, global_step=global_step)<EOL>
Save parameters into `ckpt` file.

    Parameters
    ------------
    sess : Session
        TensorFlow Session.
    mode_name : str
        The name of the model, default is ``model.ckpt``.
    save_dir : str
        The path / file directory to the `ckpt`, default is ``checkpoint``.
    var_list : list of tensor
        The parameters / variables (tensor) to be saved. If empty, save all global variables (default).
    global_step : int or None
        Step number.
    printable : boolean
        Whether to print all parameters information.

    See Also
    --------
    load_ckpt