mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
10 lines
305 B
Python
10 lines
305 B
Python
import torch
|
|
import torchvision
|
|
from demo_superpoint import SuperPointNet
|
|
model = SuperPointNet()
|
|
model.load_state_dict(torch.load("superpoint_v1.pth"))
|
|
model.eval()
|
|
example = torch.rand(1, 1, 640, 480)
|
|
traced_script_module = torch.jit.trace(model, example)
|
|
traced_script_module.save("superpoint_v1.pt")
|