The problem is with your label-data shape. In a multiclass problem you are predicting the probabibility of every possible class, so must provide label data in (N, m) shape, where N is the number of training examples, and m is the number of possible classes (3 in your case).
Keras expects y-data in (N, 3) shape, not (N,) as you’ve problably provided, that’s why it raises an error.
Use e.g. OneHotEncoder to convert your label data to one-hot encoded form.