marcellacornia / sam

Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model. IEEE Transactions on Image Processing (2018)
https://ieeexplore.ieee.org/document/8400593
MIT License
208 stars 76 forks source link

Why stuck in 'Predicting saliency maps for sample_images/'? #13

Open LvJC opened 6 years ago

LvJC commented 6 years ago

Download your codes and I just want to test if it works well. But when I run main.py as so: python main.py test sample_images/ Codes can work till it prints 'Predicting saliency maps for sample_images/' and move no more forward. Could you pls take a look at this issue?

Keras: 1.1.0 Theano: 0.9.0 OpenCV: 3.0.0

BrendenEum commented 4 years ago

I was having a similar issue for a while. What do you have typed in your .theanorc file?

At first, multiple online resources were saying to write:

[global]
optimizer = None

However, I found that this led me to be stuck at the predicting saliency stage. Instead, I changed it to:

[global]
optimizer = fast_compile

I also added to main.py:

import theano
theano.config.optimizer="fast_compile"

just in case. This worked for me.