MCPcopy Create free account
hub / github.com/NVlabs/RADIO / encode_image

Method encode_image

examples/common/model_loader.py:111–117  ·  view source on GitHub ↗
(self, image, normalize: bool = False)

Source from the content-addressed store, hash-verified

109 return op
110
111 def encode_image(self, image, normalize: bool = False):
112 token, _ = self(image)
113
114 if normalize:
115 token = F.normalize(token, dim=-1)
116
117 return token
118
119 def encode_text(self, text, normalize: bool = False, **kwargs):
120 try:

Callers 1

forwardMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected