class_docstr: This is a PyTorch implementation of the paper Disentangled Representation Learning for Text-Video Retrieval.
  Args:
      base_encoder (`str`):
          CLIP encoder backbone. default: `clip_vit_b32`
      agg_module (`str`):
          Feature aggregation module for video. default: `seqTransf`, choices=[`ndone`, `seqLSTM`, `seqTransf`]
      interaction (`str`):
          Interaction type for retrieval. default: `wti`.
      wti_arch (`int)`:
          Select a architecture for weight branch. default: 2.
      cdcr (`int`):
          Channel decorrelation regularization. default: 3.
      cdcr_alpha1 (`float`):
          Coefficient 1 for channel decorrelation regularization. default: 1.0.
      cdcr_alpha2 (`float`):
          Coefficient 2 for channel decorrelation regularization. default: 0.06.
      cdcr_lambda (`float`):
          Coefficient for channel decorrelation regularization. default: 0.001.
      cross_num_hidden_layers (`int`):
          Number of hidden layers for cross transformer interaction.
class_docstr_tok: ["This","is","a","PyTorch","implementation","of","the","paper","Disentangled","Representation","Learning","for","Text-Video","Retrieval",".","Args",":","base_encoder","(","`","str","`",")",":","CLIP","encoder","backbone",".","default",":","`","clip_vit_b32","`","agg_module","(","`","str","`",")",":","Feature","aggregation","module","for","video",".","default",":","`","seqTransf","`",",","choices=","[","`","ndone","`",",","`","seqLSTM","`",",","`","seqTransf","`","]","interaction","(","`","str","`",")",":","Interaction","type","for","retrieval",".","default",":","`","wti","`",".","wti_arch","(","`","int",")","`",":","Select","a","architecture","for","weight","branch",".","default",":","2.","cdcr","(","`","int","`",")",":","Channel","decorrelation","regularization",".","default",":","3.","cdcr_alpha1","(","`","float","`",")",":","Coefficient","1","for","channel","decorrelation","regularization",".","default",":","1.0.","cdcr_alpha2","(","`","float","`",")",":","Coefficient","2","for","channel","decorrelation","regularization",".","default",":","0.06.","cdcr_lambda","(","`","float","`",")",":","Coefficient","for","channel","decorrelation","regularization",".","default",":","0.001.","cross_num_hidden_layers","(","`","int","`",")",":","Number","of","hidden","layers","for","cross","transformer","interaction","."]
code: def get_text_sep_feat(self, text_feat, text_mask):
      text_feat = text_feat.contiguous()
      text_feat = text_feat[
          torch.arange(text_feat.shape[0]),
          torch.sum(text_mask, dim=-1) - 1,
          :,
      ]
      text_feat = text_feat.unsqueeze(1).contiguous()
      return text_feat
  
imports: from collections import OrderedDict
  from typing import Optional
  from types import SimpleNamespace
  import torch
  import logging
  from torch import nn
  from torch.nn.utils.rnn import pad_packed_sequence, pack_padded_sequence
  from towhee.models import clip
  from towhee.models.drl.until_module import convert_weights
  from towhee.models.drl.module_cross import CrossModel, Transformer
  from towhee.models.drl.until_module import LayerNorm, AllGather, AllGather2, CrossEn
label_desc: Use image node_id 7 for calling the DRL obj's underlying member method code with example usage: obj.get_text_sep_feat(text_feat, text_mask) and returns: text_feat