seq2seq
seq2seq copied to clipboard
Flag parsing error in tensorflow 1.8
When I have tried to do the unite test it gives following error,
AttributeError: module 'tensorflow.python.platform.flags' has no attribute '_FlagValues'
it happens because of this line. But current tensorflow doesn't support this type of object initiation tf.app.flags._FlagValues(). It gets deprecated from tf1.5. What is the alternate workaround here.
check out #285
vim seq2seq/test/pipeline_test.py
Update by:
def _clear_flags():
"""Resets Tensorflow's FLAG values"""
#pylint: disable=W0212
for flag_key in dir(tf.app.flags.FLAGS):
delattr(tf.app.flags.FLAGS, flag_key)
#tf.app.flags.FLAGS = tf.app.flags._FlagValues()
tf.app.flags._global_parser = argparse.ArgumentParser()