TensorFlow Eager 模块有什么用?
What is TensorFlow Eager module for?
Github链接到tensorflow中新引入的Eager模块:
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/c/eager
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/python/eager
根据这些推文:
- https://twitter.com/oshtim/status/879453382326353920
- https://twitter.com/breandan/status/879455797641719809
- https://twitter.com/mtesfald/status/879455326432632832
Eager 是 tensorflow 中的一种新命令式模式(与 the imperative module in contrib 不同)。
根据一位 Google 前实习生写的 article 解释 tensorflow
eager mode
。
基本上这是tensorflow中的一种模式,允许编写命令式编码风格,就像numpy
一样。所以应该不再有明确的 graph
、session
、session.run()
。当代码像 Chainer
/PyTorch
.
那样运行时,该图是隐式构建的
它仍在积极开发中,性能仍未达到应有的水平。您可以通过 pip
上的每晚构建来尝试它,同时期待一些有趣的新功能,例如 graph function
,它允许将子图作为函数调用。随着框架的发展,这可能是 tensorflow
.
的默认模式
更新: Tensorflow 团队已正式 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.
更新: Eager 模式现已在其网站 TF 1.7. There is a nice tutorial 中正式发布。我想现在大家都知道它是什么了,各大框架收敛,动态神经网络。
更新: Eager 模式将成为 TF 2.0 中的默认模式,下一个主要版本 planned for release 今年晚些时候 2018 年。
(准备在 1.5rc0 中 运行)
用户指南:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/eager/python/g3doc/guide.md
示例代码:
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/eager/python/examples
Eager Execution 是一个命令式的、由 运行 定义的接口,其中操作在从 Python.
调用时立即执行。
访问 https://research.googleblog.com/2017/10/eager-execution-imperative-define-by.html 了解更多详细信息。
Github链接到tensorflow中新引入的Eager模块: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/c/eager https://github.com/tensorflow/tensorflow/tree/master/tensorflow/python/eager
根据这些推文:
- https://twitter.com/oshtim/status/879453382326353920
- https://twitter.com/breandan/status/879455797641719809
- https://twitter.com/mtesfald/status/879455326432632832
Eager 是 tensorflow 中的一种新命令式模式(与 the imperative module in contrib 不同)。
根据一位 Google 前实习生写的 article 解释 tensorflow
eager mode
。
基本上这是tensorflow中的一种模式,允许编写命令式编码风格,就像numpy
一样。所以应该不再有明确的 graph
、session
、session.run()
。当代码像 Chainer
/PyTorch
.
它仍在积极开发中,性能仍未达到应有的水平。您可以通过 pip
上的每晚构建来尝试它,同时期待一些有趣的新功能,例如 graph function
,它允许将子图作为函数调用。随着框架的发展,这可能是 tensorflow
.
更新: Tensorflow 团队已正式 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.
更新: Eager 模式现已在其网站 TF 1.7. There is a nice tutorial 中正式发布。我想现在大家都知道它是什么了,各大框架收敛,动态神经网络。
更新: Eager 模式将成为 TF 2.0 中的默认模式,下一个主要版本 planned for release 今年晚些时候 2018 年。
(准备在 1.5rc0 中 运行)
用户指南:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/eager/python/g3doc/guide.md
示例代码:
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/eager/python/examples
Eager Execution 是一个命令式的、由 运行 定义的接口,其中操作在从 Python.
调用时立即执行。访问 https://research.googleblog.com/2017/10/eager-execution-imperative-define-by.html 了解更多详细信息。