channels_first vs channels_last

Channel last: The final image data of the channel is represented in a three-dimensional array where the last channel color represents the channels, e.g. [Rows] [columns] [channels].

Channel First: Image data is represented in a three-dimensional array where the first channel represents coloured channels, e.g. [Channel] [rows] [columns].

It shows the order of channels in your input tensor. Putting data_format into channel_first, you say that the size of your tensor for each layer would be as follows: (batch, channel, height, width), but for Channel_last you have (batch, height, width, channel).