Github links to the newly introduced Eager modules in tensorflow: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/c/eager https://github.com/tensorflow/tensorflow/tree/master/tensorflow/python/eager
According to an article written by a Google former intern explaining tensorflow
eager mode
.
Basically this is a mode in tensorflow that allows writing imperative coding style, like with numpy
. So there should be no explicit graph
, session
, session.run()
anymore. The graph is implicitly built when the code runs like in Chainer
/PyTorch
.
It is still under active development and the performance is still not as good as it could be. You can try it via the nightly build on pip
while expecting some interesting new features like graph function
, which allows calling a subgraph as a function. As the framework evolves, this should possibly be the default mode for tensorflow
.
Update: Tensorflow team has officially talked about it.
Eager execution is an imperative, define-by-run interface where operations are executed immediately as they are called from Python. This makes it easier to get started with TensorFlow, and can make research and development more intuitive.
A vast majority of the TensorFlow API remains the same whether eager execution is enabled or not. As a result, the exact same code that constructs TensorFlow graphs (e.g. using the layers API) can be executed imperatively by using eager execution. Conversely, most models written with Eager enabled can be converted to a graph that can be further optimized and/or extracted for deployment in production without changing code.
You can read out more about it in the blog post or the README. This is still a preview release, so you may hit some rough edges.
Looking forward to your feedback as you try it out.
Update: Eager mode is now official released in TF 1.7. There is a nice tutorial on their website. I guess everyone knows what it is by now, all major frameworks converge, dynamic neural networks.
Update: Eager mode will be the default mode in TF 2.0, the next major version planned for release later this year 2018.