Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Plot the layer heatmap
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
You can’t perform that action at this time.