Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make tensorpack work with tf eager #463

Open
eyaler opened this issue Nov 1, 2017 · 1 comment
Open

make tensorpack work with tf eager #463

eyaler opened this issue Nov 1, 2017 · 1 comment
Labels
enhancement feature or enhancement

Comments

@eyaler
Copy link
Contributor

eyaler commented Nov 1, 2017

i tried running some examples with tfe but could not get it to work
https://research.googleblog.com/2017/10/eager-execution-imperative-define-by.html

@ppwwyyxx
Copy link
Collaborator

ppwwyyxx commented Jan 7, 2018

One big distinction between eager mode and graph mode:

In eager mode, variable creation and the model math must be separate. Variables are created once, and the model is then executed many times. However, in graph mode they are both run only once and therefore they are usually together. A tf.layers.dense(x) call will create both the variables and the math operations.

As a result, in eager mode you'll almost always have to rewrite your model code anyway, into pytorch-style or Keras-style. That's not a tensorpack limitation. Eager documentation also mentions:

Some API calls (such as the functional-style tf.layers.dense, tf.layers.conv2d) are not compatible with eager execution. Use of such methods should raise an error indicating the alternative (e.g., the tf.layers.Dense and tf.layers.Conv2D classes).

So probably this feature won't happen soon.

@ppwwyyxx ppwwyyxx added the enhancement feature or enhancement label Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants