tensorflow.estimator错误:TypeError:“ builtin_function_or_method”对象不可迭代

时间:2020-05-18 12:39:02

标签: python tensorflow tensorflow-estimator

我似乎在导致错误的代码中找不到问题。如果您能提供帮助,我将不胜感激。提前致谢!从下面的代码生成的错误是

TypeError:“ builtin_function_or_method”对象不可迭代

n_batches = 1
est = tf.estimator.BoostedTreesClassifier(feature_columns,
                                          n_batches_per_layer=n_batches)

est.train(train_input_fn, max_steps=100)

result = est.evaluate(eval_input_fn.())
clear_output()
print(pd.Series(result))

1 个答案:

答案 0 :(得分:0)

更改为:if [ $ENABLE_PREVIEWS = NO ]; then xcrun agvtool next-version -all fi

不需要result = est.evaluate(eval_input_fn)后面的()括号,就像将eval_input_fn传递给train_input_fn的方式

TF文档将train()定义为

构造输入数据以进行评估的功能。