What are the NHWC and NCHW formats in TensorFlow Conv2D?

Ask Questions Forum: ask Machine Learning Questions to our readersCategory: TensorFlow/KerasWhat are the NHWC and NCHW formats in TensorFlow Conv2D?
Chris Staff asked 3 weeks ago
1 Answers
Best Answer
Chris Staff answered 3 weeks ago

NHWC stands for Number of samples, Height, Width and Channels. It therefore stands for a (batch_size, height, width, channels) input shape and represents a channels last setting.

NCHW, on the other hand, is Number of samples, Channels Height and Width, or (batch_size, channels, height, width) and thus channels first.

Source: https://www.tensorflow.org/api_docs/python/tf/nn/conv2d

Your Answer

10 + 18 =