ChangyaoTian / VL-LTR

VL-LTR: Learning Class-wise Visual-Linguistic Representation for Long-Tailed Visual Recognition
62 stars 8 forks source link

pre-trained weights with TorchScript? #5

Open xinleihe opened 2 years ago

xinleihe commented 2 years ago

Hello, Thanks for the great work! May I ask if it's possible for you to also provide the checkpoint weight in a TorchScript version?

It's something like:

import torch
import torchvision.models as models

model = models.resnet50()
traced = torch.jit.trace(model, (torch.rand(4, 3, 224, 224),))
torch.jit.save(traced, "test.pt")

# load model
model = torch.jit.load("test.pt")