Merge branch 'keras-2' of github.com:fchollet/keras into keras-2

This commit is contained in:
Francois Chollet 2017-03-13 14:15:39 -07:00
commit fe8e8fd43f

@ -1518,7 +1518,7 @@ class Model(Container):
check_batch_axis=False,
batch_size=batch_size)
# prepare inputs, delegate logic to _test_loop
if self.uses_learning_phase and not isinstance(K.learning_phase, int):
if self.uses_learning_phase and not isinstance(K.learning_phase(), int):
ins = x + y + sample_weights + [0.]
else:
ins = x + y + sample_weights
@ -1562,7 +1562,7 @@ class Model(Container):
'Batch size: ' + str(batch_size) + '.')
# prepare inputs, delegate logic to _predict_loop
if self.uses_learning_phase and not isinstance(K.learning_phase, int):
if self.uses_learning_phase and not isinstance(K.learning_phase(), int):
ins = x + [0.]
else:
ins = x
@ -1612,7 +1612,7 @@ class Model(Container):
sample_weight=sample_weight,
class_weight=class_weight,
check_batch_axis=True)
if self.uses_learning_phase and not isinstance(K.learning_phase, int):
if self.uses_learning_phase and not isinstance(K.learning_phase(), int):
ins = x + y + sample_weights + [1.]
else:
ins = x + y + sample_weights
@ -1654,7 +1654,7 @@ class Model(Container):
x, y,
sample_weight=sample_weight,
check_batch_axis=True)
if self.uses_learning_phase and not isinstance(K.learning_phase, int):
if self.uses_learning_phase and not isinstance(K.learning_phase(), int):
ins = x + y + sample_weights + [0.]
else:
ins = x + y + sample_weights
@ -1675,7 +1675,7 @@ class Model(Container):
"""
x = _standardize_input_data(x, self._feed_input_names,
self._feed_input_shapes)
if self.uses_learning_phase and not isinstance(K.learning_phase, int):
if self.uses_learning_phase and not isinstance(K.learning_phase(), int):
ins = x + [0.]
else:
ins = x