MCPcopy Index your code
hub / github.com/microsoft/Cream / get_z_from_zs

Method get_z_from_zs

TinyCLIP/src/open_clip/l0module.py:256–264  ·  view source on GitHub ↗
(self, zs)

Source from the content-addressed store, hash-verified

254 return soft_mask
255
256 def get_z_from_zs(self, zs):
257 numpified_zs = {}
258 # for t in self.all_types:
259 # name = t[:-2]
260 for t in self.types:
261 name = t
262 numpified_zs[name] = (zs[t].squeeze().detach().cpu(
263 ).numpy() > 0) if t in zs else np.ones(self.shapes[name])
264 return numpified_zs
265
266 def calculate_model_size(self, zs):
267 if zs is None:

Callers 1

calculate_model_sizeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected