Criteria for input shape

In “TensorFlow Developer Professional Certificate” most questions mention that that input shape must be in a particular shape(for the model architecture). What is the criteria that decides on the input shape? I know output shapes are based on features. Not sure about input shapes.

Hi @JoeDL

The input shape is determined by the type of the data and the model’s architecture requirements.

  • For image data, the input shape includes height, width, and color channels (e.g., (28, 28, 1) → grayscale images).

  • For sequential data, it includes the number of time steps and features per step (e.g., (100, 10)).

  • Flattened data, has an input shape based on the total number of features (e.g., (784,) for a flattened 28x28 image).

So, for each model and type of data you must determine the input shape correctly!

1 Like