arwa esam
I need to use the return of viz.visualize_image_attr(fa_attr_without_max[0].cpu().detach().permute(1, 2, 0).numpy(), sign="all", title="Integrated Gradients") as an image
this method Returns:2-element tuple of *figure, *axis their data typpe is matplotlib.pyplot.figure
I tried plt and searched for convert tuple into image but no result found
Top Answer
arwa esam
plt_fig = viz.visualize_image_attr(fa_attr_without_max[0].cpu().detach().permute(1, 2, 0).numpy(), sign=“all”, title=“Integrated Gradients”)
plt_fig[0].savefig('D:/models/' +"new.jpg", format='jpg')