Retrieve intermediate node values without explicitly return them

I’m trying to write a function that does a bunch of checks on any modules’ intermediate values, for debugging purposes. However, I don’t want to make the user to explicitly return these. Is there any way of retrieving the values of every intermediate module / variable operation?

Thanks in advance.

You could use forward hooks to get the forward activation.
I’ve created a small example in this post.

1 Like