Closed thevishalchauhan closed 3 years ago
@vishal0143 Hi there! My guess is you are executing the code on your local machine and it seems you're trying to run on CPU which is not supported by Tensorflow. If your machine does not support GPU, try running the code on Google Colab
Traceback (most recent call last): File "predict_video.py", line 107, in
X = np.rollaxis(X, 2, 0);print(m.predict( np.array([X])))
File "\anaconda3\envs\Q\lib\site-packages\tensorflow\python\keras\engine\training.py", line 1727, in predict
tmp_batch_outputs = self.predict_function(iterator)
File "anaconda3\envs\Q\lib\site-packages\tensorflow\python\eager\def_function.py", line 889, in call
result = self._call(*args, **kwds)
File "\anaconda3\envs\Q\lib\site-packages\tensorflow\python\eager\def_function.py", line 956, in _call
return self._concrete_stateful_fn._call_flat(
File "\anaconda3\envs\Q\lib\site-packages\tensorflow\python\eager\function.py", line 1960, in _call_flat
return self._build_call_outputs(self._inference_function.call(
File "\anaconda3\envs\Q\lib\site-packages\tensorflow\python\eager\function.py", line 591, in call
outputs = execute.execute(
File "anaconda3\envs\Q\lib\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:107) ]] [Op:__inference_predict_function_1776]
Function call stack: predict_function