AttributeError: module 'tensorflow_core.estimator' has no attribute 'inputs'

玉字璧

关注

阅读 86

2022-01-25


AttributeError: module ‘tensorflow_core.estimator’ has no attribute ‘inputs’

这是tensorflow版本问题,在tensorflow2.x中,已经使用tf.compat.v1.estimator.inputs.numpy_input_fn来替代tf.estimator.inputs.numpy_input_fn

所以将代码中的tf.estimator.inputs.numpy_input_fn替换为tf.compat.v1.estimator.inputs.numpy_input_fn



精彩评论(0)

0 0 举报