I can’t solve this error ‘tuple’ object has no attribute ‘reshape’ for several hours.
Could someone please come up with a solution?
AttributeError Traceback (most recent call last)
in
3
4 # Apply your function
----> 5 training_images = reshape_and_normalize(training_images)
6
7 print(f"Maximum pixel value after normalization: {np.max(training_images)}\n")
in reshape_and_normalize(images)
6
7 # Reshape the images to add an extra dimension
----> 8 images=images.reshape(60000, 28, 28, 1)
9 # Normalize pixel values
10 images = images/255.0
AttributeError: ‘tuple’ object has no attribute ‘reshape’