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

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 [Op:Conv2D] #261

Open
sdufe33306 opened this issue May 7, 2024 · 1 comment

Comments

@sdufe33306
Copy link

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 [Op:Conv2D]
In this issue, I changed the
G.init_build(tlx.nn.Input(shape=(16, 3, 96, 96)))
D.init_build(tlx.nn.Input(shape=(16, 3, 384, 384)))
to
G.init_build(tlx.nn.Input(shape=(16, 96, 96, 3))) and D.init_build(tlx.nn.Input(shape=(16, 384, 384, 3))),
However, I'm still encountering the same error?

@k2003h
Copy link

k2003h commented Sep 11, 2024

Your tensorflow version is not 2.4.0? If so, you can try to replace [data_format='channels_first'] with [data_format='channels_last']

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

No branches or pull requests

2 participants