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 compatible to TensorFlow past Nov 6, 2017 #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

f0k
Copy link

@f0k f0k commented Dec 18, 2017

This changes the bit of the code which collects hyperparameters from command line flags into a named tuple. Since Nov 6 (commit 2652704), TensorFlow uses absl.flags, which means FLAGS.__flags does not map keys to values any longer, but to Flag instances. Directly collecting those leads to errors later in the code:

Traceback (most recent call last):
    [...]
    self._example_queue = Queue.Queue(self.BATCH_QUEUE_MAX * self._hps.batch_size)
TypeError: unsupported operand type(s) for *: 'int' and 'Flag'

This PR avoids accessing the internal FLAGS.__flags such that it works fine with old and new versions of TensorFlow.

@nikhilweee
Copy link

This works fine. I wonder why this hasn't been accepted until now.

ymfa added a commit to ymfa/pointer-generator that referenced this pull request Apr 27, 2018
@zhenduow
Copy link

This is very useful. Thank you!

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.

3 participants