class_docstr: Abstract base PyTorch compressor
docstr: To register attributes used in wrapped module's forward method.
  If the type of the value is Torch.tensor, then this value is registered as a buffer in wrapper,
  which will be saved by model.state_dict. Otherwise, this value is just a regular variable in wrapper.
  
  Parameters
  ----------
  name : str
      name of the variable
  value: any
      value of the variable
docstr_tok: ["To","register","attributes","used","in","wrapped","module","'s","forward","method",".","If","the","type","of","the","value","is","Torch.tensor",",","then","this","value","is","registered","as","a","buffer","in","wrapper",",","which","will","be","saved","by","model.state_dict",".","Otherwise",",","this","value","is","just","a","regular","variable","in","wrapper",".","Parameters","--","--","--","--","--","name",":","str","name","of","the","variable","value",":","any","value","of","the","variable"]
code: def set_wrappers_attribute(self, name, value):
      """
      To register attributes used in wrapped module's forward method.
      If the type of the value is Torch.tensor, then this value is registered as a buffer in wrapper,
      which will be saved by model.state_dict. Otherwise, this value is just a regular variable in wrapper.
  
      Parameters
      ----------
      name : str
          name of the variable
      value: any
          value of the variable
      """
      for wrapper in self.get_modules_wrapper():
          if isinstance(value, torch.Tensor):
              wrapper.register_buffer(name, value.clone())
          else:
              setattr(wrapper, name, value)
  
imports: import types
  import logging
  import torch
  from .None import default_layers
label_desc: Use image node_id 8 for calling the Compressor obj's underlying member method code with example usage: obj.set_wrappers_attribute(name, value) without return types