class_docstr: Aggregation module.
  
  Args:
      - clip_length (`int=0`):
          Dimension of CLIP features.
      - embed_dim (`int=2048`):
          Dimension used in Transformer encoder.
      - n_layers (`int=6`):
          Number of layers used in Transformer encoder.
class_docstr_tok: ["Aggregation","module",".","Args",":","-","clip_length","(","`","int=0","`",")",":","Dimension","of","CLIP","features",".","-","embed_dim","(","`","int=2048","`",")",":","Dimension","used","in","Transformer","encoder",".","-","n_layers","(","`","int=6","`",")",":","Number","of","layers","used","in","Transformer","encoder","."]
code: def forward(self, x):
      nvids = x.shape[0]
  
      cls_tokens = self.cls_token.expand(nvids, -1, -1)
      x = torch.cat((cls_tokens, x), dim=1)
      x = x + self.pos_embed
      x.transpose_(1, 0)
      o = self.transformer_enc(x)
  
      return o[0]
  
imports: import torch
  from torch import nn
  from collections import OrderedDict
  from towhee.models.utils.weight_init import trunc_normal_
  from towhee.models.utils.init_vit_weights import init_vit_weights
label_desc: Use image node_id 2 for calling the TAggregate obj's underlying member method code with example usage: obj.forward(x) and returns: o