code: def __init__(self, input_dim1, input_dim2, output_dim, sum_pool=True):
      super().__init__()
      self.output_dim = output_dim
      self.sum_pool = sum_pool
      self.sketch1 = nn.Parameter(
          self.generate_sketch_matrix(
              torch.randint(output_dim, size=(input_dim1,)),
              2 * torch.randint(2, size=(input_dim1,)) - 1,
              input_dim1,
              output_dim,
          ),
          requires_grad=False,
      )
      self.sketch2 = nn.Parameter(
          self.generate_sketch_matrix(
              torch.randint(output_dim, size=(input_dim2,)),
              2 * torch.randint(2, size=(input_dim2,)) - 1,
              input_dim2,
              output_dim,
          ),
          requires_grad=False,
      )
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from mmf.common.registry import registry
  from mmf.utils.general import get_chunks, get_sizes_list, irfft, rfft
  from mmf.utils.logger import log_class_usage
label_desc: Use image node_id 1 to create a new CompactBilinearPooling object from inherited base classes: nn with example: obj = CompactBilinearPooling(input_dim1, input_dim2, output_dim, sum_pool)