gpt4 book ai didi

python - 模块 'tensorflow_estimator.python.estimator.api._v2.estimator' 没有属性 'inputs'

转载 作者:行者123 更新时间:2023-12-04 01:42:02 26 4
gpt4 key购买 nike

我正在使用 tensorflow 版本 2.0.0-beta1。打电话时

tf.estimator.inputs.pandas_input_fn

它给了我一个错误。
module 'tensorflow_estimator.python.estimator.api._v2.estimator' has no attribute 'inputs'

为了确定我尝试过的问题
tf.estimator.inputs

这给了我以下错误
module 'tensorflow_estimator.python.estimator.api._v2.estimator' has no attribute 'inputs'

我尝试在本地机器和 Google Colab 上重新安装 tensorflow,但这似乎不起作用。与之前版本的 tensorflow 相比,新版本的 tensorflow 中的此功能是否有任何变化,即(tf 版本 1.x)

最佳答案

Tensorflow V1从 Pandas DataFrames 读取 tf.estimator 的输入时我们使用了这个命令:tf.estimator.inputs.pandas_input_fn .但是现在由于 API 的变化,我们将不得不用这个命令替换那个命令:tf.compat.v1.estimator.inputs.pandas_input_fn .在这里,我们从 Tensorflow 的 Version1 到 Version2 获取相同的命令。

关于python - 模块 'tensorflow_estimator.python.estimator.api._v2.estimator' 没有属性 'inputs',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56957552/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com