I assume you’ve forked the torchvision repository and modified the resnet in your local branch?
If that’s the case, you could uninstall the official torchvision package, git clone your repository, and install it from source.
This would use your changes including your modified resnet implementation.
Also, a simpler way would be to copy-paste the resnet definition into your notebook and just use it locally.