towhee.models.collaborative_experts.collaborative_experts.create_model¶
- towhee.models.collaborative_experts.collaborative_experts.create_model(config: Optional[Dict] = None, weights_path: Optional[str] = None, device: Optional[str] = None) CENet [source]¶
Create CENet model. :param config: Config dict. :type config: Dict :param weights_path: Pretrained checkpoint path, if None, build a model without pretrained weights. :type weights_path: str :param device: Model device, cuda or cpu. :type device: str
- Returns:
CENet model.
- Return type:
(CENet)
>>> from towhee.models import collaborative_experts >>> ce_model = collaborative_experts.create_model() >>> ce_model.__class__.__name__ 'CENet'