def tf_keras_model(data): x, y = data model = TfSequential() model.add(TfDense(3, input_dim=4)) model.add(TfDense(1)) model.compile(loss="mean_squared_error", optimizer=TfSGD()) model.fit(x, y) return model
def tf_keras_model(data): x, y = data model = TfSequential() model.add(TfDense(3, input_dim=4)) model.add(TfDense(1)) model.compile(loss="mean_squared_error", optimizer=TfSGD(learning_rate=0.001)) model.fit(x.values, y.values) return model
def tf_keras_model(data): x, y = data from tensorflow.keras.models import Sequential as TfSequential from tensorflow.keras.layers import Dense as TfDense model = TfSequential() model.add(TfDense(3, input_dim=4)) model.add(TfDense(1)) model.compile(loss='mean_squared_error', optimizer='SGD') model.fit(x, y) return model