mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
Update errors_impl.py
Added the Code example for `tf.errors.ResourceExhaustedError`
This commit is contained in:
parent
b70166e24c
commit
2dcbbe3ec7
|
|
@ -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__
|
||||
"""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user