Skip to content
New issue

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

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

Already on GitHub? # to your account

e Conv2D op currently only supports the NHWC tensor format on the CPU. The op was given the format: NCHW #8

Open
amitkayal opened this issue Mar 22, 2020 · 0 comments

Comments

@amitkayal
Copy link

I am running this project into my ubuntu VM with tensorflow CPU version available. Getting following error. Can you please help me on this? HOw i can run this into my laptop?

{"metric": "run", "value": 290}
Traceback (most recent call last):
File "/home/akayal/amit/atari-master/atari.py", line 110, in
Atari()
File "/home/akayal/amit/atari-master/atari.py", line 30, in init
self._main_loop(self._game_model(game_mode, game_name, env.action_space.n), env, render, total_step_limit, total_run_limit, clip)
File "/home/akayal/amit/atari-master/atari.py", line 65, in _main_loop
game_model.step_update(total_step)
File "/home/akayal/amit/atari-master/game_models/ddqn_game_model.py", line 101, in step_update
loss, accuracy, average_max_q = self._train()
File "/home/akayal/amit/atari-master/game_models/ddqn_game_model.py", line 130, in _train
next_state_prediction = self.ddqn_target.predict(next_state)
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py", line 87, in _method_wrapper
return method(self, *args, **kwargs)
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py", line 1203, in predict
tmp_batch_outputs = predict_function(iterator)
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 580, in call
result = self._call(*args, **kwds)
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 650, in _call
return self._concrete_stateful_fn._filtered_call(canon_args, canon_kwds) # pylint: disable=protected-access
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1661, in _filtered_call
return self._call_flat(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1745, in _call_flat
return self._build_call_outputs(self._inference_function.call(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 593, in call
outputs = execute.execute(
File "/home/akayal/anaconda3/envs/amitconda/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.UnimplementedError: The Conv2D op currently only supports the NHWC tensor format on the CPU. The op was given the format: NCHW
[[node sequential_1/conv2d_3/Conv2D (defined at /amit/atari-master/game_models/ddqn_game_model.py:130) ]] [Op:__inference_predict_function_427]

Function call stack:
predict_function
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1661, in _filtered_call
return self._call_flat(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1745, in _call_flat
return self._build_call_outputs(self._inference_function.call(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 593, in call
outputs = execute.execute(
File "/home/akayal/anaconda3/envs/amitconda/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.UnimplementedError: The Conv2D op currently only supports the NHWC tensor format on the CPU. The op was given the format: NCHW
[[node sequential_1/conv2d_3/Conv2D (defined at /amit/atari-master/game_models/ddqn_game_model.py:130) ]] [Op:__inference_predict_function_427]

Function call stack:
predict_function
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1661, in _filtered_call
return self._call_flat(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1745, in _call_flat
return self._build_call_outputs(self._inference_function.call(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 593, in call
outputs = execute.execute(
File "/home/akayal/anaconda3/envs/amitconda/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.UnimplementedError: The Conv2D op currently only supports the NHWC tensor format on the CPU. The op was given the format: NCHW
[[node sequential_1/conv2d_3/Conv2D (defined at /amit/atari-master/game_models/ddqn_game_model.py:130) ]] [Op:__inference_predict_function_427]

Function call stack:
predict_function
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1661, in _filtered_call
return self._call_flat(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1745, in _call_flat
return self._build_call_outputs(self._inference_function.call(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 593, in call
outputs = execute.execute(
File "/home/akayal/anaconda3/envs/amitconda/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.UnimplementedError: The Conv2D op currently only supports the NHWC tensor format on the CPU. The op was given the format: NCHW
[[node sequential_1/conv2d_3/Conv2D (defined at /amit/atari-master/game_models/ddqn_game_model.py:130) ]] [Op:__inference_predict_function_427]

Function call stack:
predict_function
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1661, in _filtered_call
return self._call_flat(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1745, in _call_flat
return self._build_call_outputs(self._inference_function.call(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 593, in call
outputs = execute.execute(
File "/home/akayal/anaconda3/envs/amitconda/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.UnimplementedError: The Conv2D op currently only supports the NHWC tensor format on the CPU. The op was given the format: NCHW
[[node sequential_1/conv2d_3/Conv2D (defined at /amit/atari-master/game_models/ddqn_game_model.py:130) ]] [Op:__inference_predict_function_427]

Function call stack:
predict_function
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1661, in _filtered_call
return self._call_flat(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1745, in _call_flat
return self._build_call_outputs(self._inference_function.call(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 593, in call
outputs = execute.execute(
File "/home/akayal/anaconda3/envs/amitconda/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.UnimplementedError: The Conv2D op currently only supports the NHWC tensor format on the CPU. The op was given the format: NCHW
[[node sequential_1/conv2d_3/Conv2D (defined at /amit/atari-master/game_models/ddqn_game_model.py:130) ]] [Op:__inference_predict_function_427]

Function call stack:
predict_function
File "/home/akayal/amit/atari-master/game_models/ddqn_game_model.py", line 130, in _train
next_state_prediction = self.ddqn_target.predict(next_state)
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py", line 87, in _method_wrapper
return method(self, *args, **kwargs)
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py", line 1203, in predict
tmp_batch_outputs = predict_function(iterator)
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 580, in call
result = self._call(*args, **kwds)
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 650, in _call
return self._concrete_stateful_fn._filtered_call(canon_args, canon_kwds) # pylint: disable=protected-access
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1661, in _filtered_call
return self._call_flat(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1745, in _call_flat
return self._build_call_outputs(self._inference_function.call(
File "/home/akayal/anaconda3/envs/amitconda/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 593, in call
outputs = execute.execute(
File "/home/akayal/anaconda3/envs/amitconda/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.UnimplementedError: The Conv2D op currently only supports the NHWC tensor format on the CPU. The op was given the format: NCHW
[[node sequential_1/conv2d_3/Conv2D (defined at /amit/atari-master/game_models/ddqn_game_model.py:130) ]] [Op:__inference_predict_function_427]

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant