class_docstr: FeatureProcessedEmbeddingBagCollection represents a EmbeddingBagCollection module and a set of feature processor modules.
  The inputs into the FP-EBC will first be modified by the feature processor before being passed into the embedding bag collection.
  
  For details of input and output types, see EmbeddingBagCollection
  
  
  Args:
      embedding_bag_collection (EmbeddingBagCollection): ebc module
      feature_processors (Dict[str, FeatureProcessor]): feature processors
  Example::
      fp_ebc = FeatureProcessedEmbeddingBagCollection(
          EmbeddingBagCollection(...),
          {
              "feature_1": FeatureProcessorModule(...),
              "feature_2": FeatureProcessorModule2(...),
          }
      )
  
      features = KeyedJaggedTensor(
          keys=["f1", "f2"],
          values=torch.tensor([0, 1, 2, 3, 4, 5, 6, 7]),
          offsets=torch.tensor([0, 2, 2, 3, 4, 5, 8]),
      )
  
      >>> fp_ebc(features).to_dict()
      {
          "feature_1": torch.Tensor(...)
          "feature_2": torch.Tensor(...)
      }
class_docstr_tok: ["FeatureProcessedEmbeddingBagCollection","represents","a","EmbeddingBagCollection","module","and","a","set","of","feature","processor","modules",".","The","inputs","into","the","FP-EBC","will","first","be","modified","by","the","feature","processor","before","being","passed","into","the","embedding","bag","collection",".","For","details","of","input","and","output","types",",","see","EmbeddingBagCollection","Args",":","embedding_bag_collection","(","EmbeddingBagCollection",")",":","ebc","module","feature_processors","(","Dict","[","str",",","FeatureProcessor","]",")",":","feature","processors","Example",":",":","fp_ebc","=","FeatureProcessedEmbeddingBagCollection","(","EmbeddingBagCollection","(","...",")",",","{","``","feature_1","''",":","FeatureProcessorModule","(","...",")",",","``","feature_2","''",":","FeatureProcessorModule2","(","...",")",",","}",")","features","=","KeyedJaggedTensor","(","keys=","[","``","f1","''",",","``","f2","''","]",",","values=torch.tensor","(","[","0",",","1",",","2",",","3",",","4",",","5",",","6",",","7","]",")",",","offsets=torch.tensor","(","[","0",",","2",",","2",",","3",",","4",",","5",",","8","]",")",",",")",">",">",">","fp_ebc","(","features",")",".to_dict","(",")","{","``","feature_1","''",":","torch.Tensor","(","...",")","``","feature_2","''",":","torch.Tensor","(","...",")","}"]
code: def __init__(
      self,
      embedding_bag_collection: EmbeddingBagCollection,
      feature_processors: Union[
          Dict[str, FeatureProcessor], FeatureProcessorsCollection
      ],
  ) -> None:
      super().__init__()
      self._embedding_bag_collection = embedding_bag_collection
      self._feature_processors: Union[
          nn.ModuleDict, FeatureProcessorsCollection
      ]
  
      if isinstance(feature_processors, FeatureProcessorsCollection):
          self._feature_processors = feature_processors
      else:
          self._feature_processors = nn.ModuleDict(feature_processors)
  
          assert set(
              sum(
                  [
                      config.feature_names
                      for config in self._embedding_bag_collection.embedding_bag_configs()
                  ],
                  [],
              )
          ) == set(
              feature_processors.keys()
          ), "Passed in feature processors do not match feature names of embedding bag"
  
      assert (
          embedding_bag_collection.is_weighted()
      ), "EmbeddingBagCollection must accept weighted inputs for feature processor"
  
      feature_names_set: Set[str] = set()
      for (
          table_config
      ) in self._embedding_bag_collection.embedding_bag_configs():
          feature_names_set.update(table_config.feature_names)
      self._feature_names: List[str] = list(feature_names_set)
  
file_path: torchrec/torchrec/modules/fp_embedding_modules.py
imports: from typing import Dict, List, Set, Union
  import torch
  import torch.nn
  from torchrec.modules.embedding_modules import EmbeddingBagCollection
  from torchrec.modules.feature_processor_ import FeatureProcessor, FeatureProcessorsCollection
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor, KeyedTensor
label_desc: Use image node_id 1 to create a new FeatureProcessedEmbeddingBagCollection object from inherited base classes: nn with example: obj = FeatureProcessedEmbeddingBagCollection(embedding_bag_collection, feature_processors)