'Data cardinality is ambiguous(Make sure all arrays contain the same number of samples)

I got my dataset from mnist dataset,

train_images = train_images.astype("float32")/255.0
test_images = test_images.astype("float32")/255.0

network.fit(train_images, train_labels, batch_size = 64, epochs = 10, verbose =2)
network.evaluate(test_images,test_labels, batch_size = 64, verbose=2)

I got this error during training

ValueError: Data cardinality is ambiguous:   x sizes: 10000   y sizes: 60000 Make sure all arrays contain the same number of samples .

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source