Save the model parameter, marked by step_num.

def save_params(step_num, model, trainer, ckpt_dir):
    """Save the model parameter, marked by step_num."""
    param_path = os.path.join(ckpt_dir, '%07d.params'%step_num)
    trainer_path = os.path.join(ckpt_dir, '%07d.states'%step_num)
    logging.info('[step %d] Saving checkpoints to %s, %s.',
                 step_num, param_path, trainer_path)
    model.save_parameters(param_path)
    trainer.save_states(trainer_path)