0

I'm trying to make a regression model with TensorFlow while using the sklearn implementation so it plays nicely with all the other models I've made. However I cannot seem to find a way to train the model with a custom score function (cost function or objective function).

Is this simply impossible with skflow?

Thanks loads!

Paul
  • 5,473
  • 1
  • 30
  • 37
SARose
  • 3,558
  • 5
  • 39
  • 49

1 Answers1

1

Many of the examples uses learn.models.logistic_regression, which is basically a built-in high-level model that returns predictions and losses. For example, models.logistic_regression uses ops.losses_ops.softmax_classifier, which means you can look into how ops.losses_ops.softmax_classifier is implemented and implement your own loss function using perhaps TensorFlow low-level APIs.

Yuan Tang
  • 696
  • 4
  • 15