MCPcopy Create free account
hub / github.com/microsoft/Cream / forward

Method forward

TinyCLIP/src/open_clip/model.py:810–818  ·  view source on GitHub ↗
(self, text, normalized=False)

Source from the content-addressed store, hash-verified

808 return x @ self.text_projection
809
810 def forward(self, text, normalized=False):
811 mask = dict()
812
813 if self.l0_module is not None:
814 mask = self.l0_module.forward()
815
816 self.mask = mask
817
818 return self.encode_text(text, normalized=normalized, **mask)
819
820 def prune(self):
821 device = self.token_embedding.weight.device

Callers

nothing calls this directly

Calls 2

encode_textMethod · 0.95
forwardMethod · 0.45

Tested by

no test coverage detected