Skip to content

Commit 00f15ba

Browse files
committed
fit iris test case
1 parent b821818 commit 00f15ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sqlflow_models/dnnclassifier.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ def call(self, inputs):
2727

2828
def default_optimizer(self):
2929
"""Default optimizer name. Used in model.compile."""
30-
return 'adam'
30+
return tf.keras.optimizers.Adagrad(lr=0.1)
3131

3232
def default_loss(self):
3333
"""Default loss function. Used in model.compile."""
34-
return 'categorical_crossentropy'
34+
return 'sparse_categorical_crossentropy'
3535

3636
def default_training_epochs(self):
3737
"""Default training epochs. Used in model.fit."""
38-
return 5
38+
return 2
3939

4040
def prepare_prediction_column(self, prediction):
4141
"""Return the class label of highest probability."""

0 commit comments

Comments
 (0)