This error is usually raised, if you are using a newer torchvision version with an older PyTorch version, which doesn’t support the needed utilities in the torchvision model.
Make sure to update both libraries to their latest stable release (or matching versions, if you need an older one).