Is there a clean way to get the corresponding input activation from the hook_fn()? Right now, I am collecting the input by wrapping the forward() function which seems prone to mistakes.
Normally, if I were to rewrite the entire layer, I could store the corresponding input via ctx.saved_tensors:
def backward(self, ctx, grad_output):
    input, weight, bias = ctx.saved_tensors