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
205 stars 76 forks source link

ImportError: cannot import name get_from_module #34

Closed MMOSX closed 4 years ago

MMOSX commented 5 years ago

Dear I'm trying to use your network but when I execute the test with the weight that you have uploaded I have this error: Using Theano backend. Traceback (most recent call last): File "main.py", line 10, in from models import sam_vgg, sam_resnet, kl_divergence, correlation_coefficient, nss File "/media/vrai/Data/eyeTracking/sam-master/models.py", line 9, in from gaussian_prior import LearningPrior File "/media/vrai/Data/eyeTracking/sam-master/gaussian_prior.py", line 5, in from keras import initializations, regularizers, constraints File "/home/vrai/.local/lib/python2.7/site-packages/keras/initializations.py", line 104, in from .utils.generic_utils import get_from_module ImportError: cannot import name get_from_module

Can you explain to me where I'm doing a mistake?

marcellacornia commented 5 years ago

Hi @MMOSX, thanks for downloading our code.

This error seems to be caused by a too recent Keras version. Note that our code works with Keras 1.1.0 and Theano 0.9.0.