C1W3 Assignment, request for guidance

I’m new to TensorFlow but not to Python.
Right now I’m at C1W3 graded assignment and can’t really figure out how to reshape and normalise specifically.
I went through the whole course again but it’s not obvious, could anyone share some guidance or tips and tricks?
I understand the concept but need to find the right gear to set everything into motion.

Hi, welcome to the community.

You’re asking a great question — reshaping and normalizing are key preprocessing steps in deep learning, and it’s awesome that you’re taking the time to understand them well.

For reshaping, the goal is to ensure each image has an extra dimension at the end, typically used for color channels (even if the image is grayscale). This changes the shape from something like (height, width) to (height, width, 1). In the exercise, you can use NumPy’s reshape method or the expand_dims function to add that dimension — both are valid approaches depending on your preference.

For normalizing, it’s just about scaling the pixel values from their original range (0–255) to a range between 0 and 1. This is typically done by dividing every value by 255.

Hope this helps clarify things and gives you a better sense of direction — you’re definitely on the right track.