docstr: CatMaskPadding find the layers whose output tensor is passed
  to the same cat operation. The cat operation concatnates the
  masks of the input tensors as the output mask, so when some
  of the input layers of the cat operation are not pruned, we still
  need to pass the masks of these non-pruned layers(the mask are
  all ones) to the cat operation to ensure the shape of the output
  mask is right.
  
  Parameters
  ----------
  masks : dict
      a dict object that stores the masks
  model : torch.nn.Module
      model to fix the mask conflict
  dummy_input : torch.Tensor
      input example to trace the model
  traced : torch._C.torch.jit.TopLevelTracedModule
      the traced model of the target model, is this parameter is not None,
      we donnot use the model and dummpy_input to get the trace graph.
docstr_tok: ["CatMaskPadding","find","the","layers","whose","output","tensor","is","passed","to","the","same","cat","operation",".","The","cat","operation","concatnates","the","masks","of","the","input","tensors","as","the","output","mask",",","so","when","some","of","the","input","layers","of","the","cat","operation","are","not","pruned",",","we","still","need","to","pass","the","masks","of","these","non-pruned","layers","(","the","mask","are","all","ones",")","to","the","cat","operation","to","ensure","the","shape","of","the","output","mask","is","right",".","Parameters","--","--","--","--","--","masks",":","dict","a","dict","object","that","stores","the","masks","model",":","torch.nn.Module","model","to","fix","the","mask","conflict","dummy_input",":","torch.Tensor","input","example","to","trace","the","model","traced",":","torch._C.torch.jit.TopLevelTracedModule","the","traced","model","of","the","target","model",",","is","this","parameter","is","not","None",",","we","donnot","use","the","model","and","dummpy_input","to","get","the","trace","graph","."]
code: def __init__(self, masks, model, dummy_input=None, traced=None):
      """
      CatMaskPadding find the layers whose output tensor is passed
      to the same cat operation. The cat operation concatnates the
      masks of the input tensors as the output mask, so when some
      of the input layers of the cat operation are not pruned, we still
      need to pass the masks of these non-pruned layers(the mask are
      all ones) to the cat operation to ensure the shape of the output
      mask is right.
  
      Parameters
      ----------
      masks : dict
          a dict object that stores the masks
      model : torch.nn.Module
          model to fix the mask conflict
      dummy_input : torch.Tensor
          input example to trace the model
      traced : torch._C.torch.jit.TopLevelTracedModule
          the traced model of the target model, is this parameter is not None,
          we donnot use the model and dummpy_input to get the trace graph.
      """
      super(CatMaskPadding, self).__init__(
          masks, model, dummy_input, traced
      )
  
imports: import os
  import logging
  import torch
  import numpy
  from .shape_dependency import ChannelDependency, GroupDependency, CatPaddingDependency, InputChannelDependency
  from .utils import get_module_by_name
label_desc: Use image node_id 1 to create a new CatMaskPadding object from inherited base classes: MaskFix with example: obj = CatMaskPadding(masks, model, dummy_input, traced)