This answer from the forums provides a simple implementation of a forward hook to obtain the output of a particular model layer.