Q1:
It seems there's a deprecated API tf.sub in your implementation, which will throw exception like
AttributeError: 'module' object has no attribute 'sub'
in tensorflow 1.3.0+.
Change that to tf.subtract will fix it.
Q2:
Furthermore, have you ever consider using the tf.estimator.Estimator to replace sklearn.base.BaseEstimator ?
A tf.estimator.Estimator model with model.export_model will enable you to deploy a trained model with tensorflow Serving for a product env, while it can also make your training parallelized with high level api tf.contrib.learn.Experiment.
Q1:
It seems there's a deprecated API
tf.subin your implementation, which will throw exception likeAttributeError: 'module' object has no attribute 'sub'in tensorflow 1.3.0+.
Change that to
tf.subtractwill fix it.Q2:
Furthermore, have you ever consider using the
tf.estimator.Estimatorto replacesklearn.base.BaseEstimator?A
tf.estimator.Estimatormodel withmodel.export_modelwill enable you to deploy a trained model with tensorflow Serving for a product env, while it can also make your training parallelized with high level apitf.contrib.learn.Experiment.