I am in the process of extending captum’s lrp implementation by some of the rules that are not in the current pull request as I need those for a project at work. Due to that I have some questions on tensor hooks:
1.) It seems the invocation order of hooks on tensors is determined by the order of calling regsiter_hook(), which seems reasonable, but I could not find a definitive statement on this in the documentation. Can anyone clarify whether this is in fact the case?
2.) Is there a way to alter the invocation order after registration? I tried to alter the OrderedDict stored in the _backward_hooks attribute, but this does not work. So I assume the order is somehow baked into the computational graph? Is there any way to alter this apart from removing hooks and reattaching them in the desired order?
Best regards and thanks