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

[WIP] Upgrade to TensorFlow 1.0.0 #426

Merged
merged 16 commits into from
Jan 28, 2017
Merged

[WIP] Upgrade to TensorFlow 1.0.0 #426

merged 16 commits into from
Jan 28, 2017

Conversation

dustinvtran
Copy link
Member

@dustinvtran dustinvtran commented Jan 27, 2017

This pull request upgrades Edward's TensorFlow syntax to be compatible with TensorFlow 1.0.0-alpha and above. It is a work in progress.

This builds off #374.

fixes #425.

gokceneraslan and others added 9 commits December 13, 2016 11:04
I have changed a few things in order to make edward compatible with TF 0.12:

- `tf.initialize_all_variables()` calls have been renamed to `tf.global_variables_initializer()`

- `tf.Variable.ref()` calls are replaced with `value()`. See: tensorflow/tensorflow@c46f70c#diff-ae1a8f7b66539f000615a4ab7e4b2151R460. `ref()` is an internal function now. But I'm not sure whether `value()` is the correct function to use here.

- `tf.GraphKeys.VARIABLES` is replaced with `tf.GraphKeys.GLOBAL_VARIABLES`.

As a side note, even after applying these changes, edward still doesn't work because of the bug introduced in TF 0.12rc0, see: tensorflow/tensorflow@77cfa97 for the fix. Therefore I had to use TF master branch.

There are still 5 test failing, I'm looking into them.
@dustinvtran dustinvtran force-pushed the feature/1.0.0rc0 branch 3 times, most recently from 9b9e164 to 41c1192 Compare January 28, 2017 18:34
@dustinvtran
Copy link
Member Author

I ran all scripts in examples/ using TensorFlow 1.0.0rc0. They all work excluding tf_convolutional_vae.py and vae_convolutional_prettytensor.py. These two use PrettyTensor, which hasn't upgraded to work with TensorFlow 1.0.0 yet.

One note (#367) is that we do require variable ref() calls in files such as klqp.py. For example, running getting_started_example.py without the ref()'s would not learn anything. I'm not sure why this is the case; perhaps this can be diagnosed in a future PR. For now, I changed it all to use the private method _ref().

@dustinvtran dustinvtran merged commit c970f98 into master Jan 28, 2017
@dustinvtran dustinvtran deleted the feature/1.0.0rc0 branch January 28, 2017 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

edward should upgrade to work with tensorflow 1.0.0rc0
2 participants