梯度hook

tensor hook

  • register_hook

module hook

  • register_forward_hook 前向传播计算
  • register_backward_hook 反向传播计算

Ref:

http://www.tensorinfinity.com/paper_198.html

posted @ 2019-12-24 21:01  youqia  阅读(145)  评论(0编辑  收藏  举报