幾個月前,我使用了TensorFlow中的tf.contrib.learn.DNNRegressor
API,我發現它非常方便使用。過去幾個月我沒有跟上TensorFlow的發展。現在我有一個項目,我想再次使用Regressor,但是可以更好地控制DNNRegressor
提供的實際模型。據我所知,這是由使用model_fn
參數的Estimator
API支持的。TensorFlow中tf.estimator.Estimator和tf.contrib.learn.Estimator之間的區別
但有兩個Estimator
S中TensorFlow API中:
tf.contrib.learn.Estimator
tf.estimator.Estimator
都提供了類似的API,但仍然在它們的使用略有不同。爲什麼有兩種不同的實現,並且有理由更喜歡一個?
不幸的是,我無法在TensorFlow文檔或指南中找到任何區別。實際上,通過TensorFlow教程的工作產生了很多警告,因爲一些界面顯然已經發生了變化(而不是參數x
,y
參數input_fn
參數等)。