torch programming

Posted on August 12, 2021   1 minute read ∼ Filed in  : 

Hook 函数

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) )




END OF POST




Tags Cloud


Categories Cloud




It's the niceties that make the difference fate gives us the hand, and we play the cards.