def save_model(MainModel, network_filepath, weight_filepath, dump_filepath):
    model = MainModel.RefactorModel()
    model = MainModel.deploy_weight(model, weight_filepath)
    model.save_checkpoint(dump_filepath, 0)
    print('MXNet checkpoint file is saved with prefix [{}] and iteration 0, generated by [{}.py] and [{}].'.format(
        dump_filepath, network_filepath, weight_filepath))
