Input layer shape

Since we've already identified our inputs, we know that the input matrix will have a number of rows equal to the number of data elements/observations in our dataset and a number of columns equal to the number of variables/features. The shape of the input matrix then is (number of observations x 10 features). Rather than defining the exact number of records in our dataset or minibatch, TensorFlow and Keras allow us to use None as a placeholder when we define the number of elements in a dataset.

If you see a None dimension used in a Keras or TensorFlow model layer shape, it really means any, the dimension could take on any positive integer value.

Get Deep Learning Quick Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.