How to visualization for heat map for the input image and reconstruction image

How to visualization for heat map for the input image and reconstruction image

@ptrblck could you please suggest me

What should this heatmap show exactly? Would you like to visualize some gradient/update information?
If so, then I think Captum might be useful.

@ptrblck …thanks , i am trying to visualize reconstruction image using heat map. i am facing below error:
‘’’
new_imgs = decoder(resnet_vae, device, zz)

fig = plt.figure(figsize=(10, 10))

plt.subplot(1, 2, 1)

plt.imshow(X)

plt.title(‘original’)

plt.axis(‘off’)

plt.subplot(1, 2, 2)

plt.imshow(new_imgs)

plt.title(‘reconstructed’)

plt.axis(‘off’)

plt.savefig("./reconstruction_{}.png".format(exp), bbox_inches=‘tight’, dpi=600)

plt.show()

imgplot = sns.heatmap(new_imgs, xticklabels=False, yticklabels=False) ‘’’

error:ValueError: Must pass 2-d input. shape=(224, 224, 3)

seaborn.heatmap expects a 2D array as described in the docs so you won’t be able to pass an image in the shape [224, 224, 3] to it.