WARN Keras Flatten Layer 0:13 Invalid input specs. The input shape must be fully defined.

I am getting this error on adding Keras Flatten Layer.
WARN Keras Flatten Layer 0:13 Invalid input specs. The input shape must be fully defined.

Please help

Hi @hvmadhusudhana,

usually you would use a Flatten Layer to ‘flatten’ some 2D (or more dims) input. E.g. convert and image to an array, i.e. make it 1D. In your case it seems that you are already dealing with 1D data. In this case the Flatten node complains because the batch dimension is probably variable, i.e. ?. As the Flatten Layer expects at least 2D input, but there is only the first and the batch dimension, this does not work as the whole shape needs to be static for the Flatten node. I guess you simply do not need the Flatten layer here, as you input is already flat.

Hope that helps.

Cheers,
David

2 Likes

Hi David,

Thanks a lot. I got it.

Regards,
Madhu

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.