class_docstr: Depth aggregator
  Args:
      aggr (str): aggregator
      input_dim (int): input dimension
      output_dim (int): output dimension
class_docstr_tok: ["Depth","aggregator","Args",":","aggr","(","str",")",":","aggregator","input_dim","(","int",")",":","input","dimension","output_dim","(","int",")",":","output","dimension"]
code: def __init__(self, aggr, input_dim=1024, output_dim=1024):
      super().__init__()
      self.aggr = aggr
      if self.aggr == "gated":
          self.self_attn = nn.MultiheadAttention(
              input_dim, num_heads=4, dropout=0.1
          )
          self.gate_ffn = nn.Linear(input_dim, 1)
  
      if input_dim != output_dim:
          self.proj = nn.Linear(input_dim, output_dim)
      else:
          self.proj = None
  
imports: import torch
  from torch import nn
label_desc: Use image node_id 1 to create a new DepthAggregator object from inherited base classes: nn with example: obj = DepthAggregator(aggr, input_dim, output_dim)