Created
July 30, 2017 04:16
-
-
Save joelouismarino/b3ab571006d4b719a4eccde1b9bc0cb6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import theano | |
def get_activations(model, layer, X_batch): | |
get_activations = theano.function([model.layers[0].input,K.learning_phase()], layer.output, allow_input_downcast=True) | |
activations = get_activations(X_batch,0) | |
return activations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment