Runs the program with an optional main function and argv list. The program will run with eager execution enabled. Example: ```python import tensorflow as tf # Import subject to future changes: from tensorflow.contrib.eager.python import tfe def main(_): u = tf.constant(6.0)
(main=None, argv=None)
| 5888 | |
| 5889 | |
| 5890 | def eager_run(main=None, argv=None): |
| 5891 | """Runs the program with an optional main function and argv list. |
| 5892 | |
| 5893 | The program will run with eager execution enabled. |
| 5894 | |
| 5895 | Example: |
| 5896 | ```python |
| 5897 | import tensorflow as tf |
| 5898 | # Import subject to future changes: |
| 5899 | from tensorflow.contrib.eager.python import tfe |
| 5900 | |
| 5901 | def main(_): |
| 5902 | u = tf.constant(6.0) |
| 5903 | v = tf.constant(7.0) |
| 5904 | print(u * v) |
| 5905 | |
| 5906 | if __name__ == "__main__": |
| 5907 | tfe.run() |
| 5908 | ``` |
| 5909 | |
| 5910 | Args: |
| 5911 | main: the main function to run. |
| 5912 | argv: the arguments to pass to it. |
| 5913 | """ |
| 5914 | enable_eager_execution() |
| 5915 | app.run(main, argv) |
| 5916 | |
| 5917 | |
| 5918 | @tf_export(v1=["reset_default_graph"]) |
nothing calls this directly
no test coverage detected