MCPcopy Index your code
hub / github.com/openai/guided-diffusion / zero_grad

Method zero_grad

guided_diffusion/fp16_util.py:173–174  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

171 self.model.convert_to_fp16()
172
173 def zero_grad(self):
174 zero_grad(self.model_params)
175
176 def backward(self, loss: th.Tensor):
177 if self.use_fp16:

Callers 2

forward_backwardMethod · 0.80
forward_backward_logFunction · 0.80

Calls 1

zero_gradFunction · 0.85

Tested by

no test coverage detected