Yes, that what I was thinking. However, if simply copy-pasting the model code (without the unused utils) works fine, it could be easier to just to this. In any way, I would try to avoid changing the code directly in torchvision and rebuilding it, as these changes would live in you branch of torchvision and (if I’m understanding your use case correctly) you don’t want to commit these changes, as they are a standalone experiment.