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

Method encode_image

plot-adapter/clip/model.py:336–337  ·  view source on GitHub ↗
(self, image)

Source from the content-addressed store, hash-verified

334 return self.visual.conv1.weight.dtype
335
336 def encode_image(self, image):
337 return self.visual(image.type(self.dtype))
338
339 def encode_text(self, text):
340 x = self.token_embedding(text).type(self.dtype) # [batch_size, n_ctx, d_model]

Callers 1

forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected