Custom input dimension

How can i have the custom input dimension size for the input image when working with any pytorch models ,to put it more into simple words i want to change the input size which the models accepts rather than changing the sizes of my input images.

If you are doing classification most models should work for any input resolution barring memory/computational constraints as convolutional layers do not place any constraints on resolution and average pooling is applied before the fully connected layer(s). However, if you are using a pretrained model you may want to do finetuning if the object scales are very different than what would be expected at training time.

@eqy yes i want on pretrained model , i am new to all this so for example if i want it on resnet50 pre trained model how can i achieve it? Can you please elaborate a little .Thank you.

The imagenet example: examples/main.py at master ยท pytorch/examples (github.com) is a good starting point. If you have an existing dataset, you should just be able to use a pretrained model and plug in your existing dataset with minimal changes (e.g., replace the fully connected layer with one that matches the number of classes you have).