stable-baselines icon indicating copy to clipboard operation
stable-baselines copied to clipboard

[question] How to get layer activations in Tensorflow

Open lumelanie opened this issue 5 years ago • 3 comments

Hello :) Is there a way in Tensorflow to get the activations from the SAC actor network (as you could do by registering a hook to the layer in PyTorch)?

lumelanie avatar Apr 24 '20 13:04 lumelanie

Hello, You need to use a custom version of stable-baselines for that.

araffin avatar Apr 24 '20 13:04 araffin

Okay thanks, you mean defining my own custom network?

lumelanie avatar Apr 25 '20 14:04 lumelanie

Bit more than that. Unless you find a way to obtain activations from layers without modifying the session.call, you also have to modify those calls to include outputs for those mid-network activations. I have not touched TF1 in a while, and I am not sure if this is possible.

Miffyli avatar Apr 25 '20 14:04 Miffyli