The problem is when I use the TensorFlow 2.0.0 and Python 3.7 to train the gan written in TensorFlow 1.0.0 and Python 2.7 I found that Conv2DCustomBackpropInputOp only supports NHWC. Is this the case?
Is it true that Conv2DCustomBackpropInputOp only supports NHWC?
Asked Answered
I had this error and I solved it only by changing CPU to GPU!
So if you are running your model on CPU, try changing the runtime to CUDA, and use your GPU. it may work.
Most probably, the shape of your input data might be in the form, NCHW (Batch Size, Number of Channels, Height of the Image and Width of the Image).
Changing its shape to the form, NHWC (Batch Size, Height of the Image, Width of the Image and Number of Channels)
and with data_format='channels_last'
should resolve your issue.
I think the question was if Conv2D does only support NHWC (and not NCHW). I got the same issues, it is obvious that it can be fixed by changing the order to NHWC, but why we need to do so? the Conv2D accepts a parameter to specify the input order, so I would expect it to work in both cases –
Boxboard
© 2022 - 2024 — McMap. All rights reserved.
data_format='channels_first'
is broken – Hermosillo