Tensorflow 如何更新代码?

Tensorflow 如何更新代码?,tensorflow,deprecated,Tensorflow,Deprecated,我正在从运行代码。其代码如下: mnist_classifier.fit( x=train_data, y=train_labels, batch_size=100, steps=20000, monitors=[logging_hook]) eval_results = mnist_classifier.evaluate( x=eval_data, y=eval_labels, metrics=metrics) 但是对于mnist_classifier.fit()和m

我正在从运行代码。其代码如下:

mnist_classifier.fit(
  x=train_data,
  y=train_labels,
  batch_size=100,
  steps=20000,
  monitors=[logging_hook])
eval_results = mnist_classifier.evaluate(
  x=eval_data, y=eval_labels, metrics=metrics)
但是对于mnist_classifier.fit()和mnist_classifier.evaluate()的不推荐使用的参数(x、y、批大小)有一些警告。那么,调用这两个函数的新方法是什么

部分警告:

WARNING:tensorflow:From mnist.py:109: calling BaseEstimator.evaluate (from 
tensorflow.contrib.learn.python.learn.estimators.estimator) with x is 
deprecated and will be removed after 2016-12-01.
Instructions for updating:
Estimator is decoupled from Scikit Learn interface by moving into
separate class SKCompat. Arguments x, y and batch_size are only
available in the SKCompat class, Estimator will only accept input_fn.
Example conversion:
  est = Estimator(...) -> est = SKCompat(Estimator(...))
WARNING:tensorflow:From mnist.py:109: calling BaseEstimator.evaluate (from 
tensorflow.contrib.learn.python.learn.estimators.estimator) with y is 
deprecated and will be removed after 2016-12-01.
Instructions for updating:
Estimator is decoupled from Scikit Learn interface by moving into
separate class SKCompat. Arguments x, y and batch_size are only
available in the SKCompat class, Estimator will only accept input_fn.
Example conversion:
  est = Estimator(...) -> est = SKCompat(Estimator(...))

介意分享这些警告吗,这样我们就不必执行代码了?这篇博文可能会有所帮助:--如果真是这样,如果有人能将这些信息转换成答案,那就太好了。我认为上面的博文确实通过使用python lambda表达式解决了这个问题。非常感谢。可能是重复的