class_docstr: Processes the output of both `SparseArch` (sparse_features) and `DenseArch`
  (dense_features). Returns the pairwise dot product of each sparse feature pair,
  the dot product of each sparse features with the output of the dense layer,
  and the dense layer itself (all concatenated).
  
  .. note::
      The dimensionality of the `dense_features` (D) is expected to match the
      dimensionality of the `sparse_features` so that the dot products between them
      can be computed.
  
  
  Args:
      num_sparse_features (int): F.
  
  Example::
  
      D = 3
      B = 10
      keys = ["f1", "f2"]
      F = len(keys)
      inter_arch = InteractionArch(num_sparse_features=len(keys))
  
      dense_features = torch.rand((B, D))
      sparse_features = torch.rand((B, F, D))
  
      #  B X (D + F + F choose 2)
      concat_dense = inter_arch(dense_features, sparse_features)
class_docstr_tok: ["Processes","the","output","of","both","`","SparseArch","`","(","sparse_features",")","and","`","DenseArch","`","(","dense_features",")",".","Returns","the","pairwise","dot","product","of","each","sparse","feature","pair",",","the","dot","product","of","each","sparse","features","with","the","output","of","the","dense","layer",",","and","the","dense","layer","itself","(","all","concatenated",")",".","..","note",":",":","The","dimensionality","of","the","`","dense_features","`","(","D",")","is","expected","to","match","the","dimensionality","of","the","`","sparse_features","`","so","that","the","dot","products","between","them","can","be","computed",".","Args",":","num_sparse_features","(","int",")",":","F.","Example",":",":","D","=","3","B","=","10","keys","=","[","``","f1","''",",","``","f2","''","]","F","=","len","(","keys",")","inter_arch","=","InteractionArch","(","num_sparse_features=len","(","keys",")",")","dense_features","=","torch.rand","(","(","B",",","D",")",")","sparse_features","=","torch.rand","(","(","B",",","F",",","D",")",")","#","B","X","(","D","+","F","+","F","choose","2",")","concat_dense","=","inter_arch","(","dense_features",",","sparse_features",")"]
code: def __init__(self, num_sparse_features: int) -> None:
      super().__init__()
      self.F: int = num_sparse_features
      self.triu_indices: torch.Tensor = torch.triu_indices(
          self.F + 1, self.F + 1, offset=1
      )
  
imports: from typing import Dict, List, Optional, Tuple
  import torch
  from torch import nn
  from torchrec.datasets.utils import Batch
  from torchrec.modules.crossnet import LowRankCrossNet
  from torchrec.modules.embedding_modules import EmbeddingBagCollection
  from torchrec.modules.mlp import MLP
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor, KeyedTensor
label_desc: Use image node_id 1 to create a new InteractionArch object from inherited base classes: nn with example: obj = InteractionArch(num_sparse_features)