Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default MaxPoolingOp only supports NHWC on device type CPU #9

Closed
azuryl opened this issue Oct 27, 2021 · 1 comment
Closed

Default MaxPoolingOp only supports NHWC on device type CPU #9

azuryl opened this issue Oct 27, 2021 · 1 comment
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation duplicate This issue or pull request already exists

Comments

@azuryl
Copy link

azuryl commented Oct 27, 2021

2021-10-26 22:09:37.627546: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open WeightsTracknet/model.1: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
OpenCV: FFMPEG: tag 0x44495658/'XVID' is not supported with codec id 12 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'
Using device cuda
Detecting the court and the players...
/home/azuryl/anaconda3/envs/tennistrack/lib/python3.8/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /opt/conda/conda-bld/pytorch_1623448234945/work/c10/core/TensorImpl.h:1156.)
return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
BOXES [array([452.16757, 735.3489 , 572.748 , 954.95917], dtype=float32)]
BIGGEST [452. 735. 573. 955.]
Finished!
Tracking the ball: 0.0
2021-10-26 22:14:17.447722: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:185] None of the MLIR Optimization Passes are enabled (registered 2)
Traceback (most recent call last):
File "predict_video.py", line 155, in
pr = m.predict(np.array([X]))[0]
File "/home/azuryl/anaconda3/envs/tennistrack/lib/python3.8/site-packages/keras/engine/training.py", line 1751, in predict
tmp_batch_outputs = self.predict_function(iterator)
File "/home/azuryl/anaconda3/envs/tennistrack/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 885, in call
result = self._call(*args, **kwds)
File "/home/azuryl/anaconda3/envs/tennistrack/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 956, in _call
return self._concrete_stateful_fn._call_flat(
File "/home/azuryl/anaconda3/envs/tennistrack/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1963, in _call_flat
return self._build_call_outputs(self._inference_function.call(
File "/home/azuryl/anaconda3/envs/tennistrack/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 591, in call
outputs = execute.execute(
File "/home/azuryl/anaconda3/envs/tennistrack/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 59, in quick_execute
tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError: Default MaxPoolingOp only supports NHWC on device type CPU
[[node model_1/max_pooling2d/MaxPool (defined at predict_video.py:155) ]] [Op:__inference_predict_function_1776]

Function call stack:
predict_function

@shukkkur
Copy link
Member

shukkkur commented Oct 28, 2021

Hi @azuryl! Similar to comment #2, running without GPU is not supported. Try using Google Colab if you machine doesn't support GPU, the instructions are in README.md.
If this is not the case, make sure tensorflow-gpu is correctly installed.

Let me know how it goes!

@shukkkur shukkkur closed this as completed Nov 1, 2021
@shukkkur shukkkur self-assigned this Nov 9, 2021
@shukkkur shukkkur added bug Something isn't working documentation Improvements or additions to documentation duplicate This issue or pull request already exists labels Nov 9, 2021
@shukkkur shukkkur pinned this issue Jun 25, 2023
@shukkkur shukkkur changed the title tensorflow.python.framework.errors_impl.InvalidArgumentError: Default MaxPoolingOp only supports NHWC on device type CPU Default MaxPoolingOp only supports NHWC on device type CPU Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants