tensorlayer / SRGAN

Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
https://github.com/tensorlayer/tensorlayerx
3.29k stars 810 forks source 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] #261

Open sdufe33306 opened 5 months ago

sdufe33306 commented 5 months ago

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 commented 3 weeks ago

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