towhee.models.drl.drl.create_model

towhee.models.drl.drl.create_model(base_encoder: str = 'clip_vit_b32', agg_module: str = 'seqTransf', interaction: str = 'wti', wti_arch: int = 2, cdcr: int = 3, cdcr_alpha1: float = 1.0, cdcr_alpha2: float = 0.06, cdcr_lambda: float = 0.001, cross_num_hidden_layers: Optional[int] = None, pretrained: bool = False, weights_path: Optional[str] = None, device: Optional[str] = None) DRL[source]

Build a DRL model. :param base_encoder: Base_encoder in DRL model, clip_vit_b32 or clip_vit_b16. :type base_encoder: str :param agg_module: Feature aggregation module for video. default: seqTransf, choices=[ndone, seqLSTM, seqTransf] :type agg_module: str :param interaction: Interaction type for retrieval. default: wti. :type interaction: str :param wti_arch: Select an architecture for weight branch. default: 2. :type wti_arch: int :param cdcr: Channel decorrelation regularization. default: 3. :type cdcr: int :param cdcr_alpha1: Coefficient 1 for channel decorrelation regularization. default: 1.0. :type cdcr_alpha1: float :param cdcr_alpha2: Coefficient 2 for channel decorrelation regularization. default: 0.06. :type cdcr_alpha2: float :param cdcr_lambda: Coefficient for channel decorrelation regularization. default: 0.001. :type cdcr_lambda: float :param cross_num_hidden_layers: Number of hidden layers for cross transformer interaction. :type cross_num_hidden_layers: int :param pretrained: Whether model is pretrained, default if False. :type pretrained: bool :param weights_path: Pretrained model local path, default if None. :type weights_path: str :param device: Model device. cpu or cuda. :type device: str

Returns:

>>> from towhee.models import drl
>>> model = drl.create_model("clip_vit_b32")
>>> model.__class__.__name__
'DRL'