W3cubDocs

/TensorFlow Python

tf.contrib.eager.run

tf.contrib.eager.run(
    main=None,
    argv=None
)

Defined in tensorflow/python/framework/ops.py.

Runs the program with an optional main function and argv list.

The program will run with eager execution enabled.

Example:

import tensorflow as tf
# Import subject to future changes:
from tensorflow.contrib.eager.python import tfe

def main(_):
  u = tf.constant(6.0)
  v = tf.constant(7.0)
  print(u * v)

if __name__ == "__main__":
  tfe.run()

Args:

  • main: the main function to run.
  • argv: the arguments to pass to it.

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/eager/run