How to implement "Transfer Learning" on "YOLOv5"

Hi,
Please advise me, how to implement “Transfer Learning” for YOLOv5(YOLOv5 | PyTorch) instead of resnet18 used in the below tutorial.

Source - Transfer Learning(Transfer Learning for Computer Vision Tutorial — PyTorch Tutorials 1.8.0 documentation)

Thanks.