Last active
April 16, 2018 02:44
-
-
Save hanneshapke/b524a27594c520de47c7a0451b4ced78 to your computer and use it in GitHub Desktop.
Plot the layer heatmap
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
def plot_heatmap(heatmap, height_ratio=0.05): | |
# calculating how often the vector should be repeated to display a height relative to the vector length | |
repeat_vector_n_times = int(heatmap.shape[0] * height_ratio) | |
plt.matshow([heatmap] * repeat_vector_n_times) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment