Created
March 2, 2020 16:42
-
-
Save 0xfe/af81df7faaae90a217e2a48b5251b63a to your computer and use it in GitHub Desktop.
Peek into NN layers
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
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