I have got an .xlsx Excel file with an input an 2 output columns. And there are some coordinates and outputs in that file such as: x= 10 y1=15 y2=20 x= 20 y1=14 y2=22 ... I am trying to do that regression using tensorflow. But somehow i can't manage to do it. I am leaving my code here, I would appraciate it if someone could help! I also have test datas ready as well.
training_data = pd.read_excel(...\training_data.xlsx',sheet_name="i1-o2")
training_data_X = training_data['i1']
training_data_Y = training_data[['o1','o2']]
testing_data = data = pd.read_excel(....\testing_data.xlsx',sheet_name="i1-o2")
testing_data_X = testing_data['i1']
testing_data_Y = testing_data[['o1','o2']]
model = tf.keras.models.Sequential([
tf.keras.layers.Flatten(),
tf.keras.layers.Dense(128, activation=tf.nn.relu),
tf.keras.layers.Dense(128, activation=tf.nn.relu),
tf.keras.layers.Dense(128, activation=tf.nn.relu),
tf.keras.layers.Dense(128, activation=tf.nn.relu),
tf.keras.layers.Dense(128, activation=tf.nn.relu),
tf.keras.layers.Dense(128, activation=tf.nn.relu),
tf.keras.layers.Dense(6, activation='linear')
])
model.compile(optimizer='adam',
loss='mean_squared_error',
metrics=['accuracy'])
model.fit(training_data_X,training_data_Y,epochs=10,batch_size=100)
val_loss,val_acc = model.evaluate(testing_data_X,testing_data_Y)
print(val_loss,val_acc)