class_docstr: ModuleV1 is an old version of the PaddleHub Module format, which is no longer in use. In order to maintain
  compatibility, users can still load the corresponding Module for prediction. User should call `hub.Module`
  to initialize the corresponding object, rather than `ModuleV1`.
class_docstr_tok: ["ModuleV1","is","an","old","version","of","the","PaddleHub","Module","format",",","which","is","no","longer","in","use",".","In","order","to","maintain","compatibility",",","users","can","still","load","the","corresponding","Module","for","prediction",".","User","should","call","`","hub.Module","`","to","initialize","the","corresponding","object",",","rather","than","`","ModuleV1","`","."]
docstr: Export the model to Paddle Inference format.
  
  Args:
      dirname(str): The directory to save the paddle inference model.
      model_filename(str): The name of the saved model file. Default to `__model__`.
      params_filename(str): The name of the saved parameters file, only takes effect when `combined` is True.
          Default to `__params__`.
      combined(bool): Whether to save all parameters in a combined file. Default to True.
docstr_tok: ["Export","the","model","to","Paddle","Inference","format",".","Args",":","dirname","(","str",")",":","The","directory","to","save","the","paddle","inference","model",".","model_filename","(","str",")",":","The","name","of","the","saved","model","file",".","Default","to","`","__model__","`",".","params_filename","(","str",")",":","The","name","of","the","saved","parameters","file",",","only","takes","effect","when","`","combined","`","is","True",".","Default","to","`","__params__","`",".","combined","(","bool",")",":","Whether","to","save","all","parameters","in","a","combined","file",".","Default","to","True","."]
code: def save_inference_model(
      self,
      dirname: str,
      model_filename: str = None,
      params_filename: str = None,
      combined: bool = False,
      **kwargs,
  ):
      """
      Export the model to Paddle Inference format.
  
      Args:
          dirname(str): The directory to save the paddle inference model.
          model_filename(str): The name of the saved model file. Default to `__model__`.
          params_filename(str): The name of the saved parameters file, only takes effect when `combined` is True.
              Default to `__params__`.
          combined(bool): Whether to save all parameters in a combined file. Default to True.
      """
      if hasattr(self, "processor"):
          if hasattr(self.processor, "save_inference_model"):
              return self.processor.save_inference_model(
                  dirname, model_filename, params_filename, combined
              )
  
      model_filename = (
          "__model__" if not model_filename else model_filename
      )
      if combined:
          params_filename = (
              "__params__" if not params_filename else params_filename
          )
  
      place = paddle.CPUPlace()
      exe = paddle.static.Executor(place)
  
      feed_dict, fetch_dict, program = self.context(
          for_test=True, trainable=False
      )
      paddle.static.save_inference_model(
          dirname=dirname,
          main_program=program,
          executor=exe,
          feeded_var_names=[
              var.name for var in list(feed_dict.values())
          ],
          target_vars=list(fetch_dict.values()),
          model_filename=model_filename,
          params_filename=params_filename,
      )
  
      log.logger.info(
          "Paddle Inference model saved in {}.".format(dirname)
      )
  
imports: import functools
  import os
  from typing import List
  from typing import Tuple
  import paddle.io
  import paddle2onnx
  from easydict import EasyDict
  from paddlehub.compat import paddle_utils
  from paddlehub.compat.module import module_v1_utils
  from paddlehub.utils import log
  from paddlehub.utils import utils
label_desc: Use image node_id 17 for calling the ModuleV1 obj's underlying member method code with example usage: obj.save_inference_model(dirname, model_filename, params_filename, combined) and returns: self