register_hook 是 torch.tensor 的 属性 register_forward_hook 和 register_backward_hook 是 torch.nn.Module 的属性