Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Plot weights of FFT NN model
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