diff --git a/keras/engine/training.py b/keras/engine/training.py index 791f0dbaf7a..33c2a4505a3 100644 --- a/keras/engine/training.py +++ b/keras/engine/training.py @@ -1815,7 +1815,7 @@ def str2context(s): self._context = [mx.current_context()] else: if isinstance(context, str): - self_context = [context] + context = [context] self._context = [str2context(s) for s in context] self._data_names = [x.name for x in self.inputs] self._label_names = [x.name for x in self.targets + self.sample_weights]