greentfrapp / lucent

Lucid library adapted for PyTorch
Apache License 2.0
597 stars 89 forks source link

show() and export() give different images #50

Open HTalNachmani opened 5 months ago

HTalNachmani commented 5 months ago

I am working on visualising a custom model with Lucent, and need to save the images for my research. When setting save_image and show_inline to true in the render_vis function, I get different results:

Has anyone encountered this problem too, and how did you fix it?

Edit: for now, what I have done is take the code from Lucid (saving.py and associated files). If you then use the save function like the following, it saves the image, albeit a bit differently than the one being displayed by lucent:

save(rendered_image[-1], "image.png)

The export function from lucent still does not save the images properly though