Input layer is incompatible even when dimensions (apparently) match I am making a sequential neural network for classification, with 3 dense layers, which will be trained on a simple synthetic dataset. The description of dataset is as follows:

Data and class labels are integers. They are 2000 each.
There is only a single feature column (populated by np.arange(2000) * 3)
There is only a single label which indicates last digit of number (populated by np.arange(2000) *3 % 10).

After making the model, I am encountering the following error when calling model.fit():

ValueError: Input 0 of layer sequential is incompatible with the
layer: expected axis -1 of input shape to have value 1500 but received
input with shape (100, 1)

I have uploaded the commented Jupyter Notebook for this code on Google Collab: https://colab.research.google.com/drive/14v92NTBxIEIFJh2BhybfqhawHYIBvKnm?usp=sharing
Any suggestion about how to fix this error and get reasonable accuracy on training set?
You set the input shape to (1500, 2) whereas your data only contains a single feature. You should therefore change the shape to (1,) or (None, 1) to match the shape of the input data.