ModuleNotFoundError: no module named torch.utils.serialization

When I try to run a .py file that imports torch.utils.serialization, the error:
ModuleNotFoundError: no module named torch.utils.serialization
pops up. Am I missing a package or something or did I install pytorch badly?

Could be that you are missing one package. Pytorch is as far as I remember not the only one you need.
Did you install torchvision?

your .py file needs an older version of PyTorch (which had that package), but now we removed it in newer version of PyTorch.
Just check what version of pytorch that .py file needs, and install that.

Yes, that was the issue, but now I’m getting a new one:
AttributeError: module ‘sepconv’ has no attribute ‘FunctionSepconv’
Do you know what that is related to? Too new version of python? I’m using python 3.7

Is your question related to this repository? https://github.com/sniklaus/pytorch-sepconv