class_docstr: This class is to speedup the model with provided weight mask
docstr: Parameters
  ----------
  model : pytorch model
      The model user wants to speed up
  dummy_input : pytorch tensor
      The dummy input for ```jit.trace```, users should put it on right device before pass in
  masks : dict
      The pre-loaded dictionary of weight pruning masks
  masks_file : str
      The path of user provided mask file
  map_location : str
      the device on which masks are placed, same to map_location in ```torch.load```
code: def __init__(
      self,
      model,
      dummy_input,
      masks=None,
      masks_file=None,
      map_location=None,
  ):
      """
      Parameters
      ----------
      model : pytorch model
          The model user wants to speed up
      dummy_input : pytorch tensor
          The dummy input for ```jit.trace```, users should put it on right device before pass in
      masks : dict
          The pre-loaded dictionary of weight pruning masks
      masks_file : str
          The path of user provided mask file
      map_location : str
          the device on which masks are placed, same to map_location in ```torch.load```
      """
      from .._graph_utils import build_module_graph
  
      self.bound_model = model
      if masks is not None:
          self.masks = masks
      elif masks_file is not None:
          self.masks = torch.load(masks_file, map_location)
      else:
          raise ValueError(
              "Either masks or masks_file must be passed to ModelSpeedup constructor"
          )
      self.inferred_masks = (
          dict()
      )  # key: module_name, value: ModuleMasks
      self.dummy_input = dummy_input
      self.torch_graph = build_module_graph(model, dummy_input)
  
file_path: auptimizer/src/aup/compression/torch/speedup/compressor.py
imports: import logging
  import torch
  from ..utils.mask_conflict import fix_mask_conflict
  from ..utils.utils import get_module_by_name
  from .compress_modules import replace_module
  from .infer_shape import ModuleMasks, infer_from_mask, infer_from_inshape, infer_from_outshape, set_conv_prune_dim
label_desc: Use image node_id 1 to create a new ModelSpeedup object  with example: obj = ModelSpeedup(model, dummy_input, masks, masks_file, map_location)