1
votes

What does input shape mean in keras?

For instance, I am sending an input of shape (1 x 1440)-> 1 row and 1440 columns(features) to the keras model. There are totally 70,000 such vectors.

But When I query the model for output shape from this layer,

for layer in model.layers:
  if layer.name == 'input2':
     print layer.output

Output:

Tensor("input2_6:0", shape=(?, 1440), dtype=float32)

It says shape=(?, 1440). What does this mean?

Thanks!

1
Take a look at this question, it has some references on how shapes work in Tensorflow: stackoverflow.com/questions/37096225/…GPhilo

1 Answers

5
votes

The (?,) means that the model expects an arbitrary number of 1 x 1440 vectors. One generally does not what to fix the number of inputs to the model to some certain number.