marcellacornia/sam

ImportError: cannot import name get_from_module

Closed this issue · 1 comments

MMOSX commented

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?

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.