MCPcopy Create free account
hub / github.com/microsoft/Cream / get_target_sparsity

Method get_target_sparsity

TinyCLIP/src/open_clip/l0module.py:204–207  ·  view source on GitHub ↗
(self, pruned_steps)

Source from the content-addressed store, hash-verified

202 return num_parameters
203
204 def get_target_sparsity(self, pruned_steps):
205 target_sparsity = (self.target_sparsity - self.start_sparsity) * \
206 min(1, pruned_steps / self.lagrangian_warmup) + self.start_sparsity
207 return target_sparsity
208
209 def lagrangian_regularization(self, pruned_steps):
210 target_sparsity = self.get_target_sparsity(

Callers 2

naive_model_fnFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected