question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AssertionError: Checkpoint not found.

See original GitHub issue

I have tensorflow version 1.11.0

When I save the weights as a checkpoint using model.save_weights(checkpoints_path + "." + str(ep))

the file is saved as

path_to_checkpoints.0.data-00000-of-00001

not as

path_to_checkpoints.0

and when I apply

python -m keras_segmentation predict \
 --checkpoints_path="path_to_checkpoints" \
 --input_path="dataset1/images_prepped_test/" \
 --output_path="path_to_predictions"

I got the following error.

AssertionError: Checkpoint not found.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

6reactions
Shiny-ZhangXiXincommented, Apr 27, 2020

I solved this problem, you can load the model without using the function written by the author, maybe there are some bugs in it, right?The solution is as follows: in keras_segmentation/models/predict.py Comment out the following code:

Assert (os.path.isfile(checkpoints_path+"_config.json"), "Checkpoint not found."
Model_config = json. Loads (open (checkpoints_path + "_config. Json", "r"), read ())

To: Model_config = json. Loads (open (". / checkpoints/vgg_unet_1_config. Json ", "r"), read ()) Inside the quotes is the path to your json file, either absolute or relative The same thing with this one: Latest_weights = find_latest_checkpoint (checkpoints_path) To: Latest_weights = "checkpoints/vgg_unet_1. 22" Use your model file in quotes and use whatever model you want

0reactions
lyc1995452-starcommented, Apr 19, 2020

I solved it using the following command

model.save_weights(checkpoints_path + "." + str(ep), save_format='h5')

Where should I put this?Whether to retrain?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Checkpoint is not found · Issue #237 - GitHub
I am trying to run this command after I have trained the network but it is giving an error. python -m keras_segmentation predict ......
Read more >
Detectron2 Checkpoint not found - Stack Overflow
For now, I found a manual solution. I downloaded the model from the link and saved it to my drive profile. Then I...
Read more >
AssertionError: Checkpoint not found. analogous to #237 issue
Hi,. I've encountered the same issue of #237. I tried to run this google colab notebook, without positive results.
Read more >
tf.train.Checkpoint | TensorFlow v2.11.0
The assert will raise an error if any Python objects in the dependency graph were not found in the checkpoint, or if any...
Read more >
Checkpoint /home/yourstorePath/model_final_5bd44e.pkl not ...
AssertionError : Checkpoint /home/yourstorePath/model_final_5bd44e.pkl not found! · “相关推荐”对你有帮助么? · 分类专栏 · 最新评论 · 您愿意向朋友推荐 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found