Hi,
It is inherited from its parent class.
So all the way to this class: https://github.com/pytorch/vision/blob/2831f11abcb9ec7b951b6bbbcb7a85b79ee2fd79/torchvision/models/detection/generalized_rcnn.py#L15 25