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

Method forward_hook

scripts/analysis_utils.py:91–94  ·  view source on GitHub ↗
(self, module, inp, out)

Source from the content-addressed store, hash-verified

89 self.hook = module.register_forward_hook(self.forward_hook)
90
91 def forward_hook(self, module, inp, out):
92 self.input = inp
93 self.output = out
94 self.output.register_hook(self.backward_hook)
95
96 def backward_hook(self, grad):
97 self.grad = grad

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected