Search code examples
tensorflowmnistdataloader

"cannot unpack non-iterable function object" : trying to run a code through tensorflow


while running this code I am getting error

mnist = tf.keras.datasets.mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data

this should run fine .

Anybody know how to resolve this? Please help me


Solution

  • I think the () are missing in load_data. So,

    (x_train, y_train), (x_test, y_test) = mnist.load_data 
    

    Should instead be:

    (x_train, y_train), (x_test, y_test) = mnist.load_data()