Closed cyzLoveDream closed 6 years ago
Traceback (most recent call last):
File "main.py", line 85, in
please refer to https://github.com/geek-ai/Texygen/issues/14
Hello @cyzLoveDream ,Did you solved the first question? I met the same problem. If you did, please tell me.
I also ran into this problem, which seems to be due to tensorflow parsing the command line flags within the leakgan code.
I solved it by modifying main.py to run leakgan by default, so that I wouldn't have to specify the -g leakgan on the command line:
if not '-g' in opt_arg.keys():
#print('unspecified GAN type, use MLE training only...')
#gan = set_gan('mle')
print('unspecified GAN type, use leak GAN training only...')
gan = set_gan('leakgan')
This is really helpful thank you!
Traceback (most recent call last): File "main.py", line 85, in
parse_cmd(sys.argv[1:])
File "main.py", line 67, in parse_cmd
gan = set_gan(opt_arg['-g'])
File "main.py", line 26, in set_gan
gan = Gan()
File "E:\all_code\aspectLevel\Texygen\models\leakgan\Leakgan.py", line 64, in init
self.sequence_length = FLAGS.length
File "D:\Anacond\lib\site-packages\tensorflow\python\platform\flags.py", line 84, in getattr
wrapped(_sys.argv)
File "D:\Anacond\lib\site-packages\absl\flags_flagvalues.py", line 630, in call
name, value, suggestions=suggestions)
absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'g'