I have implemented a forward hook according to what is explained here.
When I apply the hook to an
nn.Linear module, I see that the
input in the hook function is a tuple of length one, i.e. (tensor, ), while the
output is a tensor. Is there a reason why input is a tuple but the output is not?