rossumai / keras-multi-gpu

Multi-GPU data-parallel training in Keras
MIT License
77 stars 20 forks source link

Argument constraints will be removed from Optimizer.get_updates() in Keras 2.0.7 #2

Open bzamecnik opened 7 years ago

bzamecnik commented 7 years ago

We call Optimizer.get_updates with self.constraints as an argument from overriden Model._make_train_function(). However, in master (that will be released in 2.0.7) this argument is removed. Although there's some legacy interface adaptor it fails with:

  File "keras/keras/engine/training.py", line 1412, in fit
    self._make_train_function()
  File "rossum-multi-gpu/data_parallel_model.py", line 161, in _make_train_function
    self.constraints,
AttributeError: 'DataParallelModel' object has no attribute 'constraints'
freshmanfresh commented 7 years ago

So,how to solve this problem? (with keras 2.0.8)

nskplta commented 6 years ago

Hi, any update on this?