diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-09-11 14:05:59 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-11 14:15:06 -0700 |
commit | b40ab8d8a024bb934f25ebc3f5260b64c5816ef5 (patch) | |
tree | 581ecf3a904dcd84ee6aed6fe97278f95243107b /tensorflow/python/util | |
parent | 2832a4f9e125c00b64614880fb08376ee03fa2da (diff) |
Adds generator support directly to Keras's fit, evaluate, and predict.
PiperOrigin-RevId: 212516939
Diffstat (limited to 'tensorflow/python/util')
-rw-r--r-- | tensorflow/python/util/tf_inspect.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/python/util/tf_inspect.py b/tensorflow/python/util/tf_inspect.py index 778121e15b..967c872c2a 100644 --- a/tensorflow/python/util/tf_inspect.py +++ b/tensorflow/python/util/tf_inspect.py @@ -325,6 +325,11 @@ def isfunction(object): # pylint: disable=redefined-builtin return _inspect.isfunction(tf_decorator.unwrap(object)[1]) +def isgenerator(object): # pylint: disable=redefined-builtin + """TFDecorator-aware replacement for inspect.isgenerator.""" + return _inspect.isgenerator(tf_decorator.unwrap(object)[1]) + + def ismethod(object): # pylint: disable=redefined-builtin """TFDecorator-aware replacement for inspect.ismethod.""" return _inspect.ismethod(tf_decorator.unwrap(object)[1]) |