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

getting error while training on CPU #15

Open
vyaslkv opened this issue Jul 30, 2020 · 1 comment
Open

getting error while training on CPU #15

vyaslkv opened this issue Jul 30, 2020 · 1 comment

Comments

@vyaslkv
Copy link

vyaslkv commented Jul 30, 2020

Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/lalit/notebooks/Lalit/image_caption/attend2u/train.py", line 211, in
tf.app.run()
File "/home/lalit/.local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/home/lalit/notebooks/Lalit/image_caption/attend2u/train.py", line 208, in main
train()
File "/home/lalit/notebooks/Lalit/image_caption/attend2u/train.py", line 134, in train
loss = _tower_loss(inputs, scope)
File "/home/lalit/notebooks/Lalit/image_caption/attend2u/train.py", line 33, in _tower_loss
net = CSMN(inputs, ModelConfig(FLAGS))
File "utils/configuration.py", line 33, in init
super(ModelConfig, self).init(FLAGS)
File "utils/configuration.py", line 12, in init
attrs = FLAGS.dict['__flags']
KeyError: '__flags'

@dhruv2601
Copy link

Syntax has changed since 1.4, you can use the following code below -

def __init__(self, FLAGS): attrs = FLAGS.flag_values_dict() for attr in attrs: setattr(self, attr.lower(), getattr(FLAGS, attr))

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

No branches or pull requests

2 participants