(args)
export

    export inference model using jit.save

    Args:
        args: Parameters generated using argparser.

    Returns: None
export
export
def export(args):
    """export

    export inference model using jit.save

    Args:
        args: Parameters generated using argparser.

    Returns: None
    """
    model = build_model(args)

    # decorate model with jit.save
    model = paddle.jit.to_static(
        model,
        input_spec=[
            InputSpec(
                shape=[None, 3, args.img_size, args.img_size], dtype='float32')
        ])
    # save inference model
    paddle.jit.save(model, os.path.join(args.save_inference_dir, "inference"))
    print(f"inference model is saved in {args.save_inference_dir}")
def export ( args ) : model = build_model ( args ) # decorate model with jit.save model = paddle . jit . to_static ( model , input_spec = [ InputSpec ( shape = [ None , 3 , args . img_size , args . img_size ] , dtype = 'float32' ) ] ) # save inference model paddle . jit . save ( model , os . path . join ( args . save_inference_dir , "inference" ) ) print ( f"inference model is saved in {args.save_inference_dir}" )