diff --git a/tensorflow/python/framework/function.py b/tensorflow/python/framework/function.py index 63c7c28b0e7..feba9757082 100644 --- a/tensorflow/python/framework/function.py +++ b/tensorflow/python/framework/function.py @@ -481,6 +481,7 @@ class _DefinedFunction(object): @property def captured_inputs(self): """Returns the list of implicitly captured inputs.""" + self._create_definition_if_needed() return self._extra_inputs def _create_definition_if_needed(self):