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

Method dtype

prototype/model/clip.py:95–105  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

93
94 @property
95 def dtype(self):
96 try:
97 return self.visual.conv1.weight.dtype
98 except:
99 try:
100 return self.visual.head.weight.dtype
101 except:
102 try:
103 return self.visual.stem[0].weight.dtype
104 except:
105 return self.encode_text.text_projection.weight.dtype
106
107 def encode_image(self, image):
108 return self.visual(image.type(self.dtype))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected