@21fa417e3fb06e56040c @maris_ancans Please see https://github.com/pytorch/pytorch/blob/115494b00bf31549aa5227068bd66a3da9de469b/test/cpp/api/autograd.cpp#L535-L612 75 for example usage of Tensor.register_hook. We will update the documentation on this soon.