torch programming
1 minute read ∼ Filed in : programming languageHook 函数
https://www.youtube.com/watch?v=syLFCVYua6Q&ab_channel=ElliotWaite
计算过程
register_forward_pre_hook ===> forward ===> register_forward_hook(func1).
backward ===> register_backward_hook(func2)
def func2(m, gi, go):
pass
# gi is the f'(x1), f'(x2)...
# go is the f'( u(x1, x2) )