user40551
user40551

Reputation: 365

'tensorflow_core.estimator' has no attribute 'inputs', why does this happen?

I am running a neural network algorithm in a jupyter notebook.

input_func = tf.estimator.inputs.pandas_input_fn(
    x=X_train,
    y=y_train,
    batch_size=10,
    num_epochs=5,
    shuffle=True)

Produces this error:

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

I don't understand why this is happening. I have tried uninstalling and reinstalling tensorflow.

Does anyone know how to fix this?

Upvotes: 4

Views: 5109

Answers (2)

dinnouti
dinnouti

Reputation: 1796

in case you are running TF 2.00. You can check the version with

print(tf.__version__)

use tf.compat.v1.estimator.inputs.pandas_input_fn instead

Upvotes: 7

Vivaka Nand
Vivaka Nand

Reputation: 1

This works:

from tensorflow_core.estimator import inputs

Upvotes: -2

Related Questions