PERF 补齐文档

This commit is contained in:
2025-02-17 15:20:50 +08:00
parent 8a8ffb4540
commit 259313edc5
5 changed files with 10 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ def test_node(image:torch.Tensor,length=10,thres=95,model_name="convnext_tiny"):
}
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = Model(model_name, 2, False).to(device)
weight = os.path.join(os.path.dirname(os.path.abspath(__file__)),weight_dic[model_name])
weight = os.path.join(os.path.dirname(os.path.abspath(__file__)), "model", weight_dic[model_name])
model = load_weight(model, weight)
model.eval()
image = image.permute(0,3,1,2)