trace.py
Go to the documentation of this file.
1 import torch
2 import torchvision
3 from demo_superpoint import SuperPointNet
4 model = SuperPointNet()
5 model.load_state_dict(torch.load("superpoint_v1.pth"))
6 model.eval()
7 example = torch.rand(1, 1, 640, 480)
8 traced_script_module = torch.jit.trace(model, example)
9 traced_script_module.save("superpoint_v1.pt")


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:22