MCPcopy Create free account
hub / github.com/Sense-GVT/DeCLIP / dtype

Method dtype

prototype/model/slip.py:154–164  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

152
153 @property
154 def dtype(self):
155 try:
156 return self.visual.conv1.weight.dtype
157 except:
158 try:
159 return self.visual.head.weight.dtype
160 except:
161 try:
162 return self.visual.stem[0].weight.dtype
163 except:
164 return self.text_encoder.text_projection.weight.dtype
165
166 def encode_image(self, image):
167 return self.visual(image.type(self.dtype))

Callers 1

_run_one_stepMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected