You can always step into the code on Github and check for yourself. For example, the first component in Fasterrcnn is a transform object which transforms the images and targets. If you step into that, you will see the resize logic