def visfeaturemap(feature_maps, filename='default.png', save=False):
# plot all 64 maps in an 8x8 squares
square = 8
ix = 1
for _ in range(square):
for _ in range(square):
# specify subplot and turn of axis
ax = plt.subplot(square, square, ix)
ax.set_xticks([])
ax.set_yticks([])
# plot filter channel in grayscale
plt.title(filename)
plt.imshow(feature_maps[0, ix - 1, :, :].cpu().numpy(), cmap='gray')
ix += 1
plt.title(filename)
plt.show()
if save:
plt.savefig(filename)
I want just one total figure title.
Plz help me^^.
Thank you.