The error indicates that there is a mismatch between the shape defined for the model and the tensors used by the model be it the training or test tensors.
In order to get rid of the error you need both shapes to match.
Expected dense_Dense1_input to have shape a but got array with shape b
In the error a is the shape of the model and b is the shape of the tensor that is throwing the error. So one needs to change whether the shape of the model to b or the shape of the tensor to be a.
The easiest way is to change the model shape to b since the second way would imply a reshape of the tensor i.e
model.add(tf.layers.dense({inputShape: b, units: 100}));
Given the model of the question, it will be
model.add(tf.layers.dense({inputShape: [27, 48], units: 100}));
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…