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

#1

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

0 Likes

#2

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

#3

Hi David,

Thanks a lot. I got it.

Regards,
Madhu

3 Likes

closed #4

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

0 Likes