torchvision was recently made 100% TorchScript compatible, but only in the most recent version. Can you check that your torchvision and PyTorch version?
import torch
print(torch.__version__)

import torchvision
print(torchvision.__version__)