code: def convert_model(
      model,
      nms=True,
      class_specific_filter=True,
      anchor_params=None,
      **kwargs,
  ):
      """Converts a training model to an inference model.
  
      Args
          model                 : A retinanet training model.
          nms                   : Boolean, whether to add NMS filtering to the converted model.
          class_specific_filter : Whether to use class specific filtering or filter for the best scoring class only.
          anchor_params         : Anchor parameters object. If omitted, default values are used.
          **kwargs              : Inference and minimal retinanet model settings.
  
      Returns
          A keras.models.Model object.
  
      Raises
          ImportError: if h5py is not available.
          ValueError: In case of an invalid savefile.
      """
      from .retinanet import retinanet_bbox
  
      return retinanet_bbox(
          model=model,
          nms=nms,
          class_specific_filter=class_specific_filter,
          anchor_params=anchor_params,
          **kwargs,
      )
  
file_path: ImageAI/imageai_tf_deprecated/Detection/keras_retinanet/models/__init__.py
imports: from __future__ import print_function
  import sys
label_desc: Use image node_id 3 for calling a global function with example usage: convert_model(model, nms, class_specific_filter, anchor_params) and returns: retinanet_bbox