This fixes the error: Input 0 of layer "dense" is incompatible with the layer: expected min_ndim=2, found ndim=1. Full shape received: (5,), which makes the current example code not run.
Passing the input_shape argument to the Dense layer, keras will create an input layer to insert before the current layer. This is equivalent to explicitly defining an InputLayer.
This fixes the error:
Input 0 of layer "dense" is incompatible with the layer: expected min_ndim=2, found ndim=1. Full shape received: (5,)
, which makes the current example code not run.Passing the
input_shape
argument to the Dense layer, keras will create an input layer to insert before the current layer. This is equivalent to explicitly defining an InputLayer.