Skip to content

Instantly share code, notes, and snippets.

@adimyth
Created January 26, 2020 09:17
Show Gist options
  • Save adimyth/8510bb3825a94d95302c883180f4faf9 to your computer and use it in GitHub Desktop.
Save adimyth/8510bb3825a94d95302c883180f4faf9 to your computer and use it in GitHub Desktop.
lstm = model.layers[2]
# Get output from intermediate layer to visualize activations
attn_func = K.function(inputs = [model.get_input_at(0), K.learning_phase()],
outputs = [lstm.output]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment