models icon indicating copy to clipboard operation
models copied to clipboard

Error while running classify_image.py from Anaconda prompt

Open ViktorijaV opened this issue 8 years ago • 8 comments

Hi, The script classify_image.py is not running from Anaconda prompt but it's perfectly working when I run it from Pycharm. I received the following output from Anaconda prompt:

2018-04-17 12:14:53.383722: I T:\src\github\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 2018-04-17 12:14:53.599685: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1344] Found device 0 with properties: name: GeForce GTX 1080 major: 6 minor: 1 memoryClockRate(GHz): 1.898 pciBusID: 0000:01:00.0 totalMemory: 8.00GiB freeMemory: 6.59GiB 2018-04-17 12:14:53.599825: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1423] Adding visible gpu devices: 0 2018-04-17 12:14:54.042890: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:911] Device interconnect StreamExecutor with strength 1 edge matrix: 2018-04-17 12:14:54.042975: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:917] 0 2018-04-17 12:14:54.043531: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:930] 0: N 2018-04-17 12:14:54.043781: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1041] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 6372 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080, pci bus id: 0000:01:00.0, compute capability: 6.1) 2018-04-17 12:14:54.716809: W T:\src\github\tensorflow\tensorflow\core\framework\op_def_util.cc:343] Op BatchNormWithGlobalNormalization is deprecated. It will cease to work in GraphDef version 9. Use tf.nn.batch_normalization(). 2018-04-17 12:14:55.379619: E T:\src\github\tensorflow\tensorflow\stream_executor\cuda\cuda_dnn.cc:396] Loaded runtime CuDNN library: 7103 (compatibility version 7100) but source was compiled with 7003 (compatibility version 7000). If using a binary install, upgrade your CuDNN library to match. If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration. 2018-04-17 12:14:55.380512: F T:\src\github\tensorflow\tensorflow\core\kernels\conv_ops.cc:712] Check failed: stream->parent()->GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNonfusedAlgo(), &algorithms)

After this is showing a window with "Python has stopped working"

Does anyone have an idea for a solution?

ViktorijaV avatar Apr 17 '18 10:04 ViktorijaV

I had the same error and I solved it by installing tensorflow 1.8.0rc0

pip3 install tensorflow-gpu==1.8.0rc0

Hope it helps ^^

amj1985 avatar Apr 18 '18 00:04 amj1985

Worked for me, thanks.

I'm using CUDA 9.0 and cuDNN 7.1.3 on a GTX 1060

ChrisBellew avatar Apr 18 '18 13:04 ChrisBellew

Worked like a charm! @amj1985

My tf is deployed on Windows 10, CUDA 9.0, cuDNN 7.1.3.

stoneyang avatar Apr 18 '18 16:04 stoneyang

Seems that binary version incompatibility is the cause of the error. As suggested by @amj1985 on the thread, please update the installed TF binary to mitigate the issue.

qlzh727 avatar Apr 18 '18 16:04 qlzh727

Thank you for the answers. I resolved it by downgrade CuDNN to the oldest version compatible with Cuda 9.0 .

ViktorijaV avatar Apr 18 '18 16:04 ViktorijaV

@amj1985 thanks alot for the solution.

Ravike14 avatar Apr 23 '18 22:04 Ravike14

Worked amazing!! Thanks a lot @amj1985 !!

robertomoreu avatar Apr 24 '18 09:04 robertomoreu

I had the same error and I solved it by installing tensorflow 1.8.0rc0

pip3 install tensorflow-gpu==1.8.0rc0

Hope it helps ^^

Also works for me. After upgrade tensorflow-gpu from 1.4 to 1.8, the bug has been fixed.

Cudnn 7.1.3 cudatoolkit 8.0 Ubuntu 16 GTX 1070

zhenglz avatar Jan 30 '19 05:01 zhenglz