code: def export_model(net, val_dataset, cfg, save_dir):
      net.forward = paddle.jit.to_static(net.forward)
      input_shape = [1] + list(val_dataset[0]["img"].shape)
      input_var = paddle.ones(input_shape)
      out = net(input_var)
  
      save_path = os.path.join(save_dir, "model")
      paddle.jit.save(net, save_path, input_spec=[input_var])
  
      yml_file = os.path.join(save_dir, "deploy.yaml")
      with open(yml_file, "w") as file:
          transforms = cfg.val_dataset_cfg["transforms"]
          data = {
              "Deploy": {
                  "transforms": transforms,
                  "model": "model.pdmodel",
                  "params": "model.pdiparams",
              }
          }
          yaml.dump(data, file)
  
file_path: PaddleSeg/deploy/slim/prune/prune.py
imports: import argparse
  import os
  import shutil
  from functools import partial
  import yaml
  import paddle
  from paddleslim.dygraph import L1NormFilterPruner
  from paddleslim.analysis import dygraph_flops
  from paddleseg.cvlibs import Config, SegBuilder
  from paddleseg.core.val import evaluate
  from paddleseg.core.train import train
  from paddleseg.utils import logger, utils
label_desc: Use image node_id 3 for calling a global function with example usage: export_model(net, val_dataset, cfg, save_dir) without return types