Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Peek into NN layers
weights_sxx = model.get_weights()[0]
weights_sxx = np.reshape(weights_sxx, (size, rows * 2, cols))
weights_sxx = np.moveaxis(weights_sxx, (0,1,2), (2,1,0))
plt.figure(figsize=(12, 7))
plt.subplot(2, 2, 1)
plt.pcolormesh(weights_sxx[0], cmap="Accent")
plt.subplot(2, 2, 2)
plt.pcolormesh(weights_sxx[10], cmap="Accent")
plt.subplot(2, 2, 3)
plt.pcolormesh(weights_sxx[20], cmap="Accent")
plt.subplot(2, 2, 4)
plt.pcolormesh(weights_sxx[30], cmap="Accent")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment