utkuozbulak / pytorch-cnn-visualizations

Pytorch implementation of convolutional neural network visualization techniques
MIT License
7.81k stars 1.49k forks source link

Segmentation fault (core dumped) with gradcam #24

Closed nessieyang closed 5 years ago

nessieyang commented 6 years ago

Hi I am using the file gradcam.py to visualize my own network. However when I begin to run it , it shows 'Segmentation fault (core dumped)'. I can't locate the problem. Can you help me to solve it? Thanks a lot!

utkuozbulak commented 6 years ago

Hey, I don't get any errors with the code. Can you check your torch version? (pip show torch) It should be 0.4.0 +

nessieyang commented 6 years ago

Hey, I don't get any errors with the code. Can you check your torch version? (pip show torch) It should be 0.4.0 +

Hi I have solved the problem. I think my torch version is okay. But the problem occurs at the file 'misc_functions.py'. It's an import problem. I just delete the line' from misc_functions import get_params, save_class_activation_on_image' from 'gradcam.py' and copy these functions to 'gradcam.py' and the code can run.

utkuozbulak commented 5 years ago

Great news!