I am afraid the best way right now is to use a Module.forward_hook() to get both inputs and outputs to your module. And then add Tensor.register_hook() directly on the input or output that you are interested in