Open ZedYeung opened 6 years ago
Makes sense. Right now for regression loss is MSE, and classification I think is cross entropy loss. I'll see what I can do.
May be just use
tf.contrib.learn.DNNEstimator
tf.contrib.learn.LinearEstimator
rather than
tf.contrib.learn.DNNRegressor
tf.contrib.learn.LinearRegressor
tf.contrib.learn.DNNClassifier
tf.contrib.learn.LinearClassifier
And add the according args in tf.contrib.learn.head like loss_fn and weight_column_name, etc
I noticed there are regularization args l1 and l2. But I cannot find the args about customizing loss function.
In evaluation,
there are multiple metrics.
Why not at least add some loss function choices like this?
It would be excellent if custom loss(score) function just as flexible as sklearn http://scikit-learn.org/stable/modules/model_evaluation.html