MCPcopy Create free account
hub / github.com/CHENGY12/PLOT / __init__

Method __init__

plot-adapter/main_imagenet.py:55–61  ·  view source on GitHub ↗
(self, clip_model)

Source from the content-addressed store, hash-verified

53
54class TextEncoder(nn.Module):
55 def __init__(self, clip_model):
56 super().__init__()
57 self.transformer = clip_model.transformer
58 self.positional_embedding = clip_model.positional_embedding
59 self.ln_final = clip_model.ln_final
60 self.text_projection = clip_model.text_projection
61 self.dtype = clip_model.dtype
62
63 def forward(self, prompts, tokenized_prompts):
64

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected