spyder: Spyder problem, kernel died all the time when tried to run session in tensorflow, is it not enough gpu to run ?

Description of your problem

The problem show up all the time, my gpu is 750 ti 2GB. Is it not enough to run sessions in tensorflow ?? Error showed below:

An error ocurred while starting the kernel OpenCV Error: Assertion failed (depth == CV_8U || depth == CV_16U || depth == CV_32F) in cv::cvtColor, file …....\modules\imgproc\src\color.cpp, line 7935 2017󈚰󈚭 16:15:29.181208: W C:\tf_jenkins\home\workspace\rel‑win\M\windows‑gpu\PY\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 2017󈚰󈚭 16:15:29.181222: W C:\tf_jenkins\home\workspace\rel‑win\M\windows‑gpu\PY\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn’t compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 2017󈚰󈚭 16:15:29.409230: I C:\tf_jenkins\home\workspace\rel‑win\M\windows‑gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:955] Found device 0 with properties: name: GeForce GTX 750 Ti major: 5 minor: 0 memoryClockRate (GHz) 1.1105 pciBusID 0000:01:00.0 Total memory: 2.00GiB Free memory: 1.65GiB 2017󈚰󈚭 16:15:29.409246: I C:\tf_jenkins\home\workspace\rel‑win\M\windows‑gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:976] DMA: 0 2017󈚰󈚭 16:15:29.409249: I C:\tf_jenkins\home\workspace\rel‑win\M\windows‑gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:986] 0: Y 2017󈚰󈚭 16:15:29.409268: I C:\tf_jenkins\home\workspace\rel‑win\M\windows‑gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) ‑> (device: 0, name: GeForce GTX 750 Ti, pci bus id: 0000:01:00.0)

What steps will reproduce the problem?

  1. Try to run sess = tf.session()
  2. Run sess.run(conv1, feed_dict={img:Image})
  3. Error showed up

What is the expected output? What do you see instead?

Please provide any additional information below

Versions and main components

  • Spyder Version: 3.5
  • Python Version: 3.5
  • Qt Version:
  • PyQt Version:
  • Operating system: windows 10

Dependencies

Please go to the menu entry Help > Optional Dependencies (or Help > Dependencies), press the button Copy to clipboard and paste the contents below:

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

Alright, with discussion with other users I realized that a specific function inside the keras 2.2.0 causes a memory leak and crash. K.clear_session() in other editors it does not cause the console to crash, but it breaks the python code in the middle of running.

it might be the reason for this weird Spyder crash.

Okay, thanks. It seems probable that the message printed in the IPython Console is indeed just a warning, as it should be, while the actual error is the one printed in the Console:

js: Not allowed to load local resource: file:///C:/Users/Hesam/AppData/Local/conda/conda/envs/P-3.6.5-CPU/lib/site-packages/spyder/utils/help/static/css/default.css

which is indeed Snyder-specific.

One thing: That error sounds like Chromium, which the new Qt web backend in 5.9 is based off, whereas QtWebKit is what’s used in 5.6. By any chance, are you running under Qt/PyQt 5.9 in that environment (you can check with conda list qt with that environment activated from the Anaconda prompt, or from the About screen in Spyder’s Help menu)? If so, can you switch to 5.6 with conda install pyqt=5.6 and see if it changes anything?

Alright, let me tell you what happened. Most likely the Spyder is right. The problem is the newly published Keras 2.2.0 which seems to hold tons of bugs! I downgraded to the Keras 2.1.6 and several issues were solved, including this one (so far).

Yes, I use Qt 5.9.4 and PyQt 5.9.2.

If so, can you switch to 5.6 with conda install pyqt=5.6 and see if it changes anything?

I will test. Besides I have to mention that I have tested the reset to default but it did not help. The only thing that I have not tested is to create a new conda environment, but since other editors did not show this specific problem with this environment, I try to analyze it. The Spyder is one head above them and I am sure this will be fixed. even if it could not, I’ll re-new the environment, it will not cost me 😃

Thanks!

Sure, I’ll test and tell you the income.

Okay, but what about in QtConsole (from Anaconda Navigator or jupyter qtconsole at the command line), as I asked above?

@VanitarNordic Doesn’t seem to be related to this issue, since its a very different error with Tensorflow running on a GPU, not on a CPU as in your example.

The first “error” should be just a warning that you can get better performance if you recompile Tensorflow for your specific CPU model. The second appears to be related to Spyder’s help pane not loading. Very odd. @ccordoba12 ?

Also, can you retry the same steps in QtConsole (jupyter qtconsole) instead and see if the problem reoccurs? You may also want to consult the Spyder Troubleshooting Guide, specifically the Basic First Aid and Emergency CPR sections.