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

Method forward

plot-pp/trainers/plotpp.py:163–174  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

161 return prompts
162
163 def forward(self):
164
165 ctx = self.ctx
166 ctx_vision = self.ctx_vision
167 if ctx.dim() == 2:
168 ctx = ctx.unsqueeze(0).expand(self.n_cls, -1, -1)
169
170 prefix = self.token_prefix
171 suffix = self.token_suffix
172 prompts = self.construct_prompts(ctx, prefix, suffix)
173
174 return prompts, ctx_vision # pass here original, as for visual 768 is required
175
176
177class CustomCLIP(nn.Module):

Callers

nothing calls this directly

Calls 1

construct_promptsMethod · 0.95

Tested by

no test coverage detected