ValueError: Found array with dim 3. Estimator expected <= 2

Hi, I keep getting this error while executing the Multiclass Classification in FFN.

Kindly Help.

Notebook Link :
https://colab.research.google.com/drive/1WGcu_jhEz-jUR2loss6rgSYrssr_3dki#scrollTo=JvkTSc4dY-Cc

You are supposed to pass a 2D input to OneHotEncoder module. See the example here:
https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.OneHotEncoder.html

You can probably try removing np.expand_dims(), which adds an extra dimension to the 2D input and makes it 3D.