Thank you for your help, Alban.
I encounter errors even without the print statements, so I don’t think the name is inflicting the error:
def backward_use_act(name, module, grad_input, grad_output):
    grad_tuple = (grad_input[0],)
    return(grad_tuple)


Traceback (most recent call last):
File “”, line 42, in 
out.backward()
File “/Users/Eigil/opt/anaconda3/lib/python3.7/site-packages/torch/tensor.py”, line 195, >in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File “/Users/Eigil/opt/anaconda3/lib/python3.7/site->packages/torch/autograd/init.py”, line 99, in backward
allow_unreachable=True)  # allow_unreachable flag
SystemError: PyEval_EvalFrameEx returned a result with an error set

For using the tensor hook (register_hook), how would I access the tensor, that gets inputted to the Sigmoid? This tensor gets created by the weights, biases and activations in a nn.Linear module, how do I access the resulting Tensor in my example?