marcellacornia / mlnet

A Deep Multi-Level Network for Saliency Prediction. ICPR 2016
MIT License
94 stars 37 forks source link

About the python version #3

Closed jzbbobo closed 7 years ago

jzbbobo commented 7 years ago

Hi, marcella. when I used this net to train my own dataset, something wrong like below:

Compile ML-Net Model
Training ML-Net
Traceback (most recent call last):
  File "main.py", line 58, in <module>
    ModelCheckpoint('weights.mlnet.{epoch:02d}-{val_loss:.4f}.pkl', save_best_only=True)])
  File "/usr/lib64/python2.7/site-packages/keras/engine/training.py", line 1343, in fit_generator
    self._make_train_function()
  File "/usr/lib64/python2.7/site-packages/keras/engine/training.py", line 695, in _make_train_function
    self.constraints,
  File "/usr/lib64/python2.7/site-packages/keras/engine/topology.py", line 1948, in constraints
    for key, value in layer.constraints.items():
AttributeError: 'list' object has no attribute 'items'

the python version about my machine is 2.7 .

marcellacornia commented 7 years ago

Hi @jzbbobo, this problem is due to the new version of keras. In the latest version, the layer constraints syntax has been changed.

I've just updated the eltwise product layer. Now it should work.

jzbbobo commented 7 years ago

It works now, thanks for your help.