Search code examples
kerasdataformat

Data Format in Keras Model


I'm using a Convolutional Network, and I wonder which data_format is being used in my code? Because from this page: Convolutional Layers

In the Conv2D layer section, it says input shape can assume two different forms depending on the data_format ("channels_first" or "channels_last"). I assume on of them is the default option?

And what command should I add to my code to change between those two formats?


Solution

  • Oh, just found the answer, here:

    Answer

    So, it uses the "channels_last" if using TensorFlow backend to keras and "channels_first" if using Theano backend.