Explore Courses Blog Tutorials Interview Questions
+1 vote
1 view
in AI and Deep Learning by (3.5k points)
edited by
I want my model to be trained with some classified images. They are of different sizes, so how can I train my model without resizing the images?

1 Answer

0 votes
by (10.9k points)
edited by

@Ritik, you haven’t mentioned what architecture you are talking about so let us assume it’s a partly convolutional, partly connected network like AlexNet, GoogLeNet , etc. The answer to your question depends on the network type which you are working with.

Let us assume you have a network which contains a lot of convolutional units and does not have any fully connected layers, so it can be invariant to the size of the input image. This type of network can process the input images and return another image as output. Remember to make sure that the output matches your expectation since you have to find the loss.

If you are using fully connected units then it can be big trouble for you, following are some ways to solve your problem:

  • Don’t care about the squashing of images.
  • Centre-crop the images to a specific size.
  • Pad the image with a solid color and then resize it
  • Perform the combination of the above.

visit here for examples:

Hope this answer helps!

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94.2k users

Browse Categories