This commit is contained in:
Dominik Strzako 2021-05-14 20:15:24 +02:00
parent f7fc121fd7
commit e61e90da02

View File

@ -21,14 +21,14 @@ x_train, x_test, y_train, y_test = train_test_split(x,y , test_size=0.2,train_si
def regression_model():
model = Sequential()
model.add(Dense(32,activation = "relu", input_shape = (x_train.shape[1],)))
model.add(Dense(64,activation = "relu"))
model.add(Dense(16,activation = "relu", input_shape = (x_train.shape[1],)))
model.add(Dense(32,activation = "relu"))
model.add(Dense(1,activation = "relu"))
model.compile(optimizer = "adam", loss = "mean_squared_error")
return model
model = regression_model()
model.fit(x_train, y_train, epochs = 600, verbose = 1)
model.fit(x_train, y_train, epochs = 40, verbose = 1)
model.save('wine_model')