MCPcopy Create free account
hub / github.com/DragonisCV/RAM / backward_hook

Method backward_hook

scripts/analysis_utils.py:96–98  ·  view source on GitHub ↗
(self, grad)

Source from the content-addressed store, hash-verified

94 self.output.register_hook(self.backward_hook)
95
96 def backward_hook(self, grad):
97 self.grad = grad
98 return grad
99
100class BaseAnalysis(BaseModel):
101 def __init__(self, opt):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected