MCPcopy Create free account
hub / github.com/WeChatCV/WeVisionOne / __init__

Method __init__

Inference/text_prompt.py:28–34  ·  view source on GitHub ↗
(self, cfg)

Source from the content-addressed store, hash-verified

26
27class Model(nn.Module):
28 def __init__(self, cfg):
29 super().__init__()
30 self.backbone = build_backbone(cfg)
31 self.sem_seg_head = SEM_SEG_HEADS_REGISTRY.get(cfg.MODEL.SEM_SEG_HEAD.NAME)(cfg, self.backbone.output_shape())
32 self.text_backbone = BACKBONE_REGISTRY.get("CLIPLangEncoder")(cfg, None)
33
34 self.proj_text_256 = torch.nn.Linear(768, 256)
35
36 def forward(self, x, texts):
37 backboneOutput = self.backbone(x)

Callers

nothing calls this directly

Calls 2

getMethod · 0.80
output_shapeMethod · 0.80

Tested by

no test coverage detected