Using Pytorch 0.5.0 with Torchvision 0.4.2

have been trying to get PyTorch 0.5 working with Torchvision. I know its pretty old but that’s what I am supposed to work with due to using GPGPUSim. The torchvision version I have is 0.4.2.

When I try to do import torchvision, I get the following error:

File “/usr/local/lib/python3.5/site-packages/torch/jit/frontend.py”, line 422, in build_Subscript
raise NotSupportedError(base.range(), “slicing multiple dimensions at the same time isn’t supported yet”)
torch.jit.frontend.NotSupportedError: slicing multiple dimensions at the same time isn’t supported yet

Is there a way to get around the version mismatch issue?

If you really need these particular versions, you could

  • try to remove/comment all related (jit) errors
  • use a compatible torchvision version and add the missing pieces you need

I’m not sure, how much work the first approach would be, so the latter one might be easier e.g. if you just need one specific model or functionality.

Hi @ptrblck, how may I know the compatible torchvision version for a corresponding torch version? Thank you in advance.

You could have a look at the vision release notes, where the PyTorch dependencies are mentioned.

Thanks a lot for the response.
The issue in removing the related (jit) errors is that every change I make is leading to it breaking somewhere else.

Anyways, one of my colleagues says that torchvision 0.4.0 should work fine. Trying that.