import pandas as pd
data=pd.read_csv("tesdata.csv")
data
x=data.iloc[:,0:2].values
y=data.iloc[:,2].values
from sklearn.preprocessing import StandardScaler
sc=StandardScaler()
x=sc.fit_transform(x)
y=sc.fit_transform(y.reshape(1,-1))
from keras.models import Sequential
from keras.layers import Dense
model=Sequential()
model.add(Dense(2, activation='relu'))
model.add(Dense(10, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
model.compile(loss='mean_squared_error',optimizer='Adam',metrics=['accuracy'])
model.fit(x,y.reshape(1,-1),epochs=30,batch_size=21)
ValueError: Data cardinality is ambiguous:
x sizes: 21 y sizes: 1
Please provide data which shares the same first dimension.
my data


I have replicated the same issue with one of sample csv file.
I found that you need not to
standardizeorreshapethe label here. Check below code snippets:Output: