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.

Keras hangs on predit

See original GitHub issue

After some days of test on this project, i’m facing a problem. I’m using the pre-trained resnet50_coco_best_v2.0.3.h5 and tensorflow without GPU. My goal is similar to the notebook in /exsamples, but in real time. I had modified the code of the notebook and (even if it was too slow for real-time) it worked.

Today trying the code, I raealized that there was some problem. And it seems to be Keras that hangs on predict (it successfully load the model).

In the beginning I thought that could be some modification that I made, but I have now the same problem with the original notebook.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
lukeb88commented, May 1, 2018

Guys, i was stuck on this problem for a few days… i have spent a few days triyng to understand where the problem was… This evening i managed to find the solution … simply uninstalling keras and tensorflow and then reinstalling them at the same version…

1reaction
lukeb88commented, Apr 24, 2018

thanks anyway! I’ll try to investigate!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Keras predict in a process freezes - Stack Overflow
Now if I run this normally, it executes and returns a prediction but through the Process with the thread function it freezes on...
Read more >
Hanging on prediction - Beginners - Hugging Face Forums
I am used to Keras, so I'm using the tensorflow version above, and to predict I use model.predict on the tokenized input sentences....
Read more >
Model.predict hangs for Keras model in Flask with uwsgi (repost)
It turns out that the Keras model's predict() method hangs, but only when running it in production with Flask and uwsgi.
Read more >
How to not deploy Keras/TensorFlow models
When your web server only serves one single request at the time, you are fine, as the model was loaded in this thread...
Read more >
Trouble with model.predict() - The freeCodeCamp Forum
import tensorflow as tf import tensorflow_datasets as tfds keras ... top layer weights='imagenet') """"" Freezing the Base The term freezing ...
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