Skip to content

Instantly share code, notes, and snippets.

@saurabhpal97
Last active Apr 17, 2019
Embed
What would you like to do?
layers = model.layers
layer_ids = [1,4,7,11,15]
#plot the filters
fig,ax = plt.subplots(nrows=1,ncols=5)
for i in range(5):
ax[i].imshow(layers[layer_ids[i]].get_weights()[0][:,:,:,0][:,:,0],cmap='gray')
ax[i].set_title('block'+str(i+1))
ax[i].set_xticks([])
ax[i].set_yticks([])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment