Is Tensorflow loading twice in PyCharm?

2019-09-06 16:02发布

问题:

I'm using flask as the web server running keras with tensor flow backend. Every time I restart it, it shows up like this:

Does this mean that Tensorflow is loading twice? Or is it because I'm running it in PyCharm and the debugger is active - how can I disable it? The 3 lines below don't come up when running on IDLE. Tensorflow takes quite a while to load, so it would be great if I can only have it load once.

Thank you for any comment and suggestions.

回答1:

I ran into the same error. In my case it was because predict was called in a different thread than the one in which load_model was called. Moved them to the same thread the the problem was gone.