Update errors_impl.py

Added the Code example for `tf.errors.ResourceExhaustedError`
This commit is contained in:
rmothukuru 2021-07-08 19:10:11 +05:30 committed by GitHub
parent b70166e24c
commit 2dcbbe3ec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -385,6 +385,16 @@ class ResourceExhaustedError(OpError):
For example, this error might be raised if a per-user quota is
exhausted, or perhaps the entire file system is out of space.
Example:
>>> try:
>>> session = tf.compat.v1.Session()
>>> sess.run(node_output, feed_dict={node_input : value_input})
>>> except tf.errors.ResourceExhaustedError as e:
>>> config = tf.compat.v1.ConfigProto()
>>> config.gpu_options.allow_growth = True
>>> session = tf.compat.v1.Session(config=config)
@@__init__
"""