MCPcopy
hub / github.com/facebookresearch/MetaCLIP / encode_image

Method encode_image

src/mini_clip/model.py:423–424  ·  view source on GitHub ↗
(self, image)

Source from the content-addressed store, hash-verified

421 self.transformer.grad_checkpointing = enable
422
423 def encode_image(self, image):
424 return self.visual(image)
425
426 def encode_text(self, text):
427 x = self.token_embedding(text) # [batch_size, n_ctx, d_model]

Callers 8

forwardMethod · 0.95
validate_zeroshotFunction · 0.80
train_altogetherFunction · 0.80
runFunction · 0.80
inferenceFunction · 0.80
test_inferenceFunction · 0.80
test_metaclip2_inferenceFunction · 0.80
test_inferenceFunction · 0.80

Calls

no outgoing calls

Tested by 3

test_inferenceFunction · 0.64
test_metaclip2_inferenceFunction · 0.64
test_inferenceFunction · 0.64