Created
March 2, 2020 18:48
-
-
Save 0xfe/89a0c10da18fef15602af5b2d59a66d6 to your computer and use it in GitHub Desktop.
Plot weights of FFT NN model
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_weights(index, weights=model.get_weights()[0], N=fft_size): | |
plt.figure(figsize=(9, 3)) | |
plt.subplot(1, 2, 1) | |
plt.plot(weights[index][:N]) | |
plt.plot(weights[index][N:], 'g-') | |
plt.subplot(1, 2, 2) | |
plt.plot(weights[fft_size+index][:N]) | |
plt.plot(weights[fft_size+index][N:], 'g-') | |
plt.show() | |
for index in [((2**n) - 1) for n in range(0, 5)]: | |
plot_weights(index) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment