目前在官网没有看到2.2里没有看到train接口

来源:5-4 keras_to_estimator

慕设计0293856

2020-06-15

针对estimator.train报错,目前在官网2.2的API中,没有找到estimator.train接口,只有train_and_evaluate,同时百度查到如下内容:

Estimator 不支持 Eager Execution(eager execution能够使用Python 的debug工具、数据结构与控制流。并且无需使用placeholder、session,计算结果能够立即得出)

写回答

1回答

正十七

2020-06-17

train_and_eval类似于一个static函数,它调用tf.estimator.Estimator的train和eval方法。

train方法还是有的,在tf.estimator.Eestimator里:https://www.tensorflow.org/api_docs/python/tf/estimator/Estimator#train

而tf.estimator.train_and_eval 则在这里:https://www.tensorflow.org/api_docs/python/tf/estimator/train_and_evaluate

它接受一个tf.estimator.Estimator作为参数。

你在百度搜的是正确的啊,没问题。

0
0

Google老师亲授 TensorFlow2.0 入门到进阶

Tensorflow2.0实战—以实战促理论的方式学习深度学习

1849 学习 · 896 问题

查看课程