use*_*244 3 python tensorflow tensorflow2.0
我正在使用 tensorflow 版本 2.0.0-beta1。打电话时
tf.estimator.inputs.pandas_input_fn
Run Code Online (Sandbox Code Playgroud)
它给了我一个错误。
module 'tensorflow_estimator.python.estimator.api._v2.estimator' has no attribute 'inputs'
Run Code Online (Sandbox Code Playgroud)
为了找出我尝试过的问题
tf.estimator.inputs
Run Code Online (Sandbox Code Playgroud)
这给了我以下错误
module 'tensorflow_estimator.python.estimator.api._v2.estimator' has no attribute 'inputs'
Run Code Online (Sandbox Code Playgroud)
我曾尝试在本地机器和 Google Colab 上重新安装 tensorflow,但这似乎不起作用。与先前版本的 tensorflow ie(tf 版本 1.x)相比,新版本的 tensorflow 中的此功能是否有任何变化
在Tensorflow V1虽然从熊猫DataFrames读取输入tf.estimator我们使用这个命令:tf.estimator.inputs.pandas_input_fn。但是现在由于 API 更改,我们将不得不用以下命令替换该命令:tf.compat.v1.estimator.inputs.pandas_input_fn。在这里,我们从 Tensorflow 的 Version1 到 Version2 获取相同的命令。