Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is TensorFlow Eager module for? [closed]

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

like image 393
myth510 Avatar asked Aug 30 '17 18:08

myth510


2 Answers

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.

like image 118
THN Avatar answered Sep 23 '22 00:09

THN


Eager execution is an imperative, define-by-run interface where operations are executed immediately as they are called from Python.

Visit https://research.googleblog.com/2017/10/eager-execution-imperative-define-by.html for more detail information.

like image 35
Ratnesh Kushwaha Avatar answered Sep 23 '22 00:09

Ratnesh Kushwaha