Open narrowsnap opened 6 years ago
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'
第二行print,在ckpt为None时报错: