The passed save_path is not a valid chechpoint


I am running a code from this repo. I am on tensorflow 2.8.0, but unfortunatly the code is in tensorflow 1 so i had to change tf by tf.compat.v1 for some functions.

The code is the following :

    config = tf.compat.v1.ConfigProto(allow_soft_placement=True)
    sess = tf.compat.v1.Session(config=config)

    # SAVER
    train_saver = tf.compat.v1.train.Saver()
    #train_saver = tf.train.Checkpoint()

    # INIT
    coordinator = tf.train.Coordinator()
    threads = tf.compat.v1.train.start_queue_runners(sess=sess, coord=coordinator)

    restore_path = args.checkpoint_path.split(".")[0]
    train_saver.restore(sess, restore_path)

I executed the command python --image_path ~/DSC_0194.JPG --checkpoint_path ~/models/model_kitti and I have the following error :

File “C:\Users\a.g\Anaconda3\lib\site-packages\tensorflow\python\training\”, line 1392, in restore raise ValueError("The passed save_path is not a valid checkpoint: " + ValueError: The passed save_path is not a valid checkpoint: ~/models/model_kitti

In ~/models/, I have 3 files : model_kitti.meta, model_kitti.index,

Do you know how to solve this problem ?

Hi Anthony,

My memory of tf 1 is a bit vague, but did you try to just specify ~/models as path?