Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

s2s一个小bug #23

Open
narrowsnap opened this issue Apr 16, 2018 · 0 comments
Open

s2s一个小bug #23

narrowsnap opened this issue Apr 16, 2018 · 0 comments

Comments

@narrowsnap
Copy link

ckpt = tf.train.get_checkpoint_state(FLAGS.model_dir)
print("ckpt path : ", ckpt.model_checkpoint_path)
if ckpt != None:
    print("load old model : ", ckpt.model_checkpoint_path)
    model.saver.restore(sess, ckpt.model_checkpoint_path)

第二行print,在ckpt为None时报错:

AttributeError: 'NoneType' object has no attribute 'model_checkpoint_path'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant