TensorFlow 2.0 Beta is available Learn more

tf.keras.backend.image_data_format

TensorFlow 2.0 version View source on GitHub

Returns the default image data format convention.

Aliases:

  • tf.compat.v1.keras.backend.image_data_format
  • tf.compat.v2.keras.backend.image_data_format
tf.keras.backend.image_data_format()

Returns:

A string, either 'channels_first' or 'channels_last'

Example:

keras.backend.image_data_format() >>> 'channels_first'