Is it true that Conv2DCustomBackpropInputOp only supports NHWC?
Asked Answered
J

2

8

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?

enter image description here

Jelly answered 17/11, 2019 at 2:9 Comment(1)
it seems like data_format='channels_first' is brokenHermosillo
B
2

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.

Billboard answered 3/3, 2022 at 20:6 Comment(0)
H
1

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.

Horsemint answered 19/11, 2019 at 12:24 Comment(1)
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 casesBoxboard

© 2022 - 2024 — McMap. All rights reserved.