Skip to content

Commit fe8e8fd

Browse files
committed
Merge branch 'keras-2' of github.com:fchollet/keras into keras-2
2 parents 1f87cff + 966ec31 commit fe8e8fd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

keras/engine/training.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ def evaluate(self, x, y, batch_size=32, verbose=1, sample_weight=None):
15181518
check_batch_axis=False,
15191519
batch_size=batch_size)
15201520
# prepare inputs, delegate logic to _test_loop
1521-
if self.uses_learning_phase and not isinstance(K.learning_phase, int):
1521+
if self.uses_learning_phase and not isinstance(K.learning_phase(), int):
15221522
ins = x + y + sample_weights + [0.]
15231523
else:
15241524
ins = x + y + sample_weights
@@ -1562,7 +1562,7 @@ def predict(self, x, batch_size=32, verbose=0):
15621562
'Batch size: ' + str(batch_size) + '.')
15631563

15641564
# prepare inputs, delegate logic to _predict_loop
1565-
if self.uses_learning_phase and not isinstance(K.learning_phase, int):
1565+
if self.uses_learning_phase and not isinstance(K.learning_phase(), int):
15661566
ins = x + [0.]
15671567
else:
15681568
ins = x
@@ -1612,7 +1612,7 @@ def train_on_batch(self, x, y,
16121612
sample_weight=sample_weight,
16131613
class_weight=class_weight,
16141614
check_batch_axis=True)
1615-
if self.uses_learning_phase and not isinstance(K.learning_phase, int):
1615+
if self.uses_learning_phase and not isinstance(K.learning_phase(), int):
16161616
ins = x + y + sample_weights + [1.]
16171617
else:
16181618
ins = x + y + sample_weights
@@ -1654,7 +1654,7 @@ def test_on_batch(self, x, y, sample_weight=None):
16541654
x, y,
16551655
sample_weight=sample_weight,
16561656
check_batch_axis=True)
1657-
if self.uses_learning_phase and not isinstance(K.learning_phase, int):
1657+
if self.uses_learning_phase and not isinstance(K.learning_phase(), int):
16581658
ins = x + y + sample_weights + [0.]
16591659
else:
16601660
ins = x + y + sample_weights
@@ -1675,7 +1675,7 @@ def predict_on_batch(self, x):
16751675
"""
16761676
x = _standardize_input_data(x, self._feed_input_names,
16771677
self._feed_input_shapes)
1678-
if self.uses_learning_phase and not isinstance(K.learning_phase, int):
1678+
if self.uses_learning_phase and not isinstance(K.learning_phase(), int):
16791679
ins = x + [0.]
16801680
else:
16811681
ins = x

0 commit comments

Comments
 (0)