Error when checking target: expected dense_3 to have shape (2,) but got array with shape (1,)
Your numpy arrays
(both for inputs and outputs) should contain a batch dimension. If your labels are currently of shape (2,)
, you can reshape them to include a batch dimension as follows:
label_array = label_array.reshape(1, -1)