MCPcopy Create free account
hub / github.com/Monalissaa/DisenDiff / encode_image

Method encode_image

clip/model.py:346–347  ·  view source on GitHub ↗
(self, image)

Source from the content-addressed store, hash-verified

344 return self.visual.conv1.weight.dtype
345
346 def encode_image(self, image):
347 return self.visual(image.type(self.dtype))
348
349 def encode_text(self, text):
350 x = self.token_embedding(text).type(self.dtype) # [batch_size, n_ctx, d_model]

Callers 3

forwardMethod · 0.95
encode_imagesMethod · 0.80
extract_all_imagesFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected