Up to higher level directory | |||
Name | Date | Size | |
---|---|---|---|
proto/ | 21-Aug-2018 | ||
python/ | 21-Aug-2018 | ||
README.md | 21-Aug-2018 | 1.9K |
1 # Eager Execution 2 3 > *WARNING*: This is a preview/pre-alpha version. The API and performance 4 > characteristics are subject to change. 5 6 Eager execution is an experimental interface to TensorFlow that provides an 7 imperative programming style ( la [NumPy](http://www.numpy.org)). When you 8 enable eager execution, TensorFlow operations execute immediately; you do not 9 execute a pre-constructed graph with 10 [`Session.run()`](https://www.tensorflow.org/api_docs/python/tf/Session). 11 12 For example, consider a simple computation in TensorFlow: 13 14 ```python 15 x = tf.placeholder(tf.float32, shape=[1, 1]) 16 m = tf.matmul(x, x) 17 18 with tf.Session() as sess: 19 print(sess.run(m, feed_dict={x: [[2.]]})) 20 21 # Will print [[4.]] 22 ``` 23 24 Eager execution makes this much simpler: 25 26 ```python 27 x = [[2.]] 28 m = tf.matmul(x, x) 29 30 print(m) 31 ``` 32 33 ## Caveats 34 35 This feature is in early stages and work remains to be done in terms of smooth 36 support for distributed and multi-GPU training and CPU performance. 37 38 - [Known issues](https://github.com/tensorflow/tensorflow/issues?q=is%3Aissue%20is%3Aopen%20label%3Acomp%3Aeager) 39 - Feedback is welcome, please consider 40 [filing an issue](https://github.com/tensorflow/tensorflow/issues/new) to provide it. 41 42 ## Installation 43 44 Eager execution is included in TensorFlow versions 1.5 and above. 45 Installation instructions at https://www.tensorflow.org/install/ 46 47 ## Documentation 48 49 For an introduction to eager execution in TensorFlow, see: 50 51 - [User Guide](python/g3doc/guide.md) 52 - Notebook: [Basic Usage](python/examples/notebooks/1_basics.ipynb) 53 - Notebook: [Gradients](python/examples/notebooks/2_gradients.ipynb) 54 - Notebook: [Importing Data](python/examples/notebooks/3_datasets.ipynb) 55 56 ## Changelog 57 58 - 2017/10/31: Initial preview release. 59 - 2017/12/01: Example of dynamic neural network: 60 [SPINN: Stack-augmented Parser-Interpreter Neural Network](https://arxiv.org/abs/1603.06021). 61 See [README.md](python/examples/spinn/README.md) for details. 62