SiamR-CNN icon indicating copy to clipboard operation
SiamR-CNN copied to clipboard

Invalid argument: Default MaxPoolingOp only supports NHWC on device type CPU

Open Mr-doraemon opened this issue 4 years ago • 10 comments

Hi, when I try to run python3 tracking/do_tracking.py --main main_otb2015, the following error will occurs.

**`E tensorflow/core/common_runtime/executor.cc:642] Executor failed to create kernel. Invalid argument: Default MaxPoolingOp only supports NHWC on device type CPU [[{{node pool0/MaxPool}}]]

Traceback (most recent call last): File "/home/users2/anaconda3/envs/env3.6/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File "/home/users2/anaconda3/envs/env3.6/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn target_list, run_metadata) File "/home/user2/anaconda3/envs/env3.6/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: Default MaxPoolingOp only supports NHWC on device type CPU [[{{node pool0/MaxPool}}]] **

I know some people say that because TensorFlow uses CPU version, but I only installed the GPU version of TensorFlow and the version is 1.15. Could you help me solve this problem?

Mr-doraemon avatar Jul 06 '20 14:07 Mr-doraemon

Hi,

TensorFlow is not using the GPU for some reason. Please first make sure that you are able to use the GPU at all with the current TensorFlow version, there should be some explanation on how to find out which device is used on the TensorFlow website/Google.

pvoigtlaender avatar Jul 06 '20 14:07 pvoigtlaender

Hi,I met this problem too,have u solved it? can u share it with me please? Thanks very much @Mr-doraemon

EchoAmor avatar Jul 09 '20 08:07 EchoAmor

Hi,I met this problem too,have u solved it? can u share it with me please? Thanks very much @Mr-doraemon

I think you should make sure that your TensorFlow-GPU version fits your CUDA version

Mr-doraemon avatar Jul 09 '20 12:07 Mr-doraemon

@Mr-doraemon yes,I have googled this error,and found that it's because the CUDA's library can't be found, but I saw in tensorflow and make sure Tensorflow-GPU-1.15 fits with CUDA10.0+cudnn7.4, it's the same with mine. Still appearance the error... DO u use the same version?

EchoAmor avatar Jul 09 '20 12:07 EchoAmor

Sorry, my CUDA version is 9, so I changed other versions of Tensorflow-GPU, but I haven't verified the correctness because the GPU is used by others

------------------ 原始邮件 ------------------ 发件人: "Echo"<[email protected]>; 发送时间: 2020年7月9日(星期四) 晚上8:32 收件人: "VisualComputingInstitute/SiamR-CNN"<[email protected]>; 抄送: "刘耀"<[email protected]>;"Mention"<[email protected]>; 主题: Re: [VisualComputingInstitute/SiamR-CNN] Invalid argument: Default MaxPoolingOp only supports NHWC on device type CPU (#12)

@Mr-doraemon yes,I have googled this error,and found that it's because the CUDA's library can't be found, but I saw in tensorflow and make sure Tensorflow-GPU-1.15 fits with CUDA10.0+cudnn7.4, it's the same with mine. Still appearance the error... DO u use the same version?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Mr-doraemon avatar Jul 09 '20 12:07 Mr-doraemon

Thanks anyway! If it works for you ,can u please tell me here ,thanks very much! @Mr-doraemon

EchoAmor avatar Jul 09 '20 12:07 EchoAmor

OK! if I don't contact you, I hope you can talk to me when you run successfully

------------------ 原始邮件 ------------------ 发件人: "Echo"<[email protected]>; 发送时间: 2020年7月9日(星期四) 晚上8:43 收件人: "VisualComputingInstitute/SiamR-CNN"<[email protected]>; 抄送: "刘耀"<[email protected]>;"Mention"<[email protected]>; 主题: Re: [VisualComputingInstitute/SiamR-CNN] Invalid argument: Default MaxPoolingOp only supports NHWC on device type CPU (#12)

Thanks anyway! If it works for you ,can u please tell me here ,thanks very much! @Mr-doraemon

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Mr-doraemon avatar Jul 09 '20 12:07 Mr-doraemon

I have solved this by add environment variable debug_cuda but get another error--

`tensorflow.python.framework.errors_impl.InternalError: 2 root error(s) found.

(0) Internal: cuDNN launch failure : input shape([1,3,805,1093]) filter shape([7,7,3,64]) [[node conv0/Conv2D (defined at /home/echo/anaconda3/envs/Siamrcnn/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) ]] [[rpn/feature/_2535]] (1) Internal: cuDNN launch failure : input shape([1,3,805,1093]) filter shape([7,7,3,64]) [[node conv0/Conv2D (defined at /home/echo/anaconda3/envs/Siamrcnn/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) `

I haven't change your code ,so I think it's maybe the version problem, you just give the Tensorflow version ,can you tell me what's the version of CUDA and CUDNN? @pvoigtlaender @Mr-doraemon

EchoAmor avatar Jul 09 '20 14:07 EchoAmor

I have solved this by add environment variable debug_cuda but get another error--

`tensorflow.python.framework.errors_impl.InternalError: 2 root error(s) found.

(0) Internal: cuDNN launch failure : input shape([1,3,805,1093]) filter shape([7,7,3,64]) [[node conv0/Conv2D (defined at /home/echo/anaconda3/envs/Siamrcnn/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) ]] [[rpn/feature/_2535]] (1) Internal: cuDNN launch failure : input shape([1,3,805,1093]) filter shape([7,7,3,64]) [[node conv0/Conv2D (defined at /home/echo/anaconda3/envs/Siamrcnn/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) `

I haven't change your code ,so I think it's maybe the version problem, you just give the Tensorflow version ,can you tell me what's the version of CUDA and CUDNN? @pvoigtlaender @Mr-doraemon

now, I have the same problem as you!

Mr-doraemon avatar Jul 09 '20 23:07 Mr-doraemon

I have solved this by add environment variable debug_cuda but get another error--

`tensorflow.python.framework.errors_impl.InternalError: 2 root error(s) found.

(0) Internal: cuDNN launch failure : input shape([1,3,805,1093]) filter shape([7,7,3,64]) [[node conv0/Conv2D (defined at /home/echo/anaconda3/envs/Siamrcnn/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) ]] [[rpn/feature/_2535]] (1) Internal: cuDNN launch failure : input shape([1,3,805,1093]) filter shape([7,7,3,64]) [[node conv0/Conv2D (defined at /home/echo/anaconda3/envs/Siamrcnn/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) `

I haven't change your code ,so I think it's maybe the version problem, you just give the Tensorflow version ,can you tell me what's the version of CUDA and CUDNN? @pvoigtlaender @Mr-doraemon

This can be solved by conda install tensorflow-gpu=1.15.0

ValentiaSulli avatar Apr 09 '21 06:04 ValentiaSulli