You can modify the sourcecode of the network to return any value that you need. In principle hooks are the way to get intermidiate outputs not modifying the network.
Another way is to save it in self during forward.