Skip to content

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