class_docstr: A quantized EmbeddingBag module with quantized packed weights as inputs.
  We adopt the same interface as `torch.nn.EmbeddingBag`, please see
  https://pytorch.org/docs/stable/nn.html#torch.nn.EmbeddingBag for documentation.
  
  Similar to :class:`~torch.nn.EmbeddingBag`, attributes will be randomly
  initialized at module creation time and will be overwritten later
  
  Attributes:
      weight (Tensor): the non-learnable quantized weights of the module of
                       shape :math:`(\text{num\_embeddings}, \text{embedding\_dim})`.
  
  Examples::
      >>> m = nn.quantized.EmbeddingBag(num_embeddings=10, embedding_dim=12, include_last_offset=True, mode='sum')
      >>> indices = torch.tensor([9, 6, 5, 7, 8, 8, 9, 2, 8, 6, 6, 9, 1, 6, 8, 8, 3, 2, 3, 6, 3, 6, 5, 7, 0, 8, 4, 6, 5, 8, 2, 3])
      >>> offsets = torch.tensor([0, 19, 20, 28, 28, 32])
      >>> output = m(indices, offsets)
      >>> print(output.size())
      torch.Size([5, 12])
class_docstr_tok: ["A","quantized","EmbeddingBag","module","with","quantized","packed","weights","as","inputs",".","We","adopt","the","same","interface","as","`","torch.nn.EmbeddingBag","`",",","please","see","https",":","\/\/pytorch.org\/docs\/stable\/nn.html","#","torch.nn.EmbeddingBag","for","documentation",".","Similar","to",":","class",":","`","~torch.nn.EmbeddingBag","`",",","attributes","will","be","randomly","initialized","at","module","creation","time","and","will","be","overwritten","later","Attributes",":","weight","(","Tensor",")",":","the","non-learnable","quantized","weights","of","the","module","of","shape",":","math",":","`","(","\\text","{","num\\_embeddings","}",",","\\text","{","embedding\\_dim","}",")","`",".","Examples",":",":",">",">",">","m","=","nn.quantized.EmbeddingBag","(","num_embeddings=10",",","embedding_dim=12",",","include_last_offset=True",",","mode='sum","'",")",">",">",">","indices","=","torch.tensor","(","[","9",",","6",",","5",",","7",",","8",",","8",",","9",",","2",",","8",",","6",",","6",",","9",",","1",",","6",",","8",",","8",",","3",",","2",",","3",",","6",",","3",",","6",",","5",",","7",",","0",",","8",",","4",",","6",",","5",",","8",",","2",",","3","]",")",">",">",">","offsets","=","torch.tensor","(","[","0",",","19",",","20",",","28",",","28",",","32","]",")",">",">",">","output","=","m","(","indices",",","offsets",")",">",">",">","print","(","output.size","(",")",")","torch.Size","(","[","5",",","12","]",")"]
code: def forward(
      self,
      indices: Tensor,
      offsets: Optional[Tensor] = None,
      per_sample_weights: Optional[Tensor] = None,
      compressed_indices_mapping: Optional[Tensor] = None,
  ) -> Tensor:
      if self.dtype == torch.quint4x2:
          return torch.ops.quantized.embedding_bag_4bit(
              self._packed_params._packed_weight,
              indices,
              offsets,
              False,
              0,
              self.pruned_weights,
              per_sample_weights,
              compressed_indices_mapping,
              self.include_last_offset,
          )
      else:
          return torch.ops.quantized.embedding_bag_byte(
              self._packed_params._packed_weight,
              indices,
              offsets,
              False,
              0,
              self.pruned_weights,
              per_sample_weights,
              compressed_indices_mapping,
              self.include_last_offset,
          )
  
imports: import torch
  import torch.nn
  from torch import Tensor
  from torch._jit_internal import Optional, List
  from .utils import _hide_packed_params_repr
  from .utils import _quantize_weight
label_desc: Use image node_id 2 for calling the EmbeddingBag obj's underlying member method code with example usage: obj.forward(indices, offsets, per_sample_weights, compressed_indices_mapping) and returns: torch, torch