General advice, look at the docs! This will answer most of your questions. For example, here 1, it says that if you pass in a single parameter, it will resize the shortest side of the image to that (and maintain the aspect ratio).
First thing I would do though is to make sure you understand the basics of what you’re trying to do. Do you know what a fully connected neural net is? I see that your bio says you’re in high school and you’re just starting. That’s when I started! A common starting point for many (including myself) is Andrew Ng’s free machine learning course.