Skip to content

Commit

Permalink
update testMSMT
Browse files Browse the repository at this point in the history
  • Loading branch information
layumi committed May 11, 2023
1 parent 515592a commit 36cac9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test_MSMT.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,15 @@ def get_id(img_path):
# To do so, we can call `.trace` on the reparamtrized module with dummy inputs
# expected by the module.
# Comment out this following line if you do not want to trace.
dummy_forward_input = torch.rand(opt.batchsize, 3, h, w).cuda()
model = torch.jit.trace(model, dummy_forward_input)
#dummy_forward_input = torch.rand(opt.batchsize, 3, h, w).cuda()
#model = torch.jit.trace(model, dummy_forward_input)

print(model)
# Extract feature
since = time.time()
with torch.no_grad():
gallery_feature = extract_feature(model,dataloaders['gallery'])
query_feature = extract_feature(model,dataloaders['query'])
gallery_feature = extract_feature(model,dataloaders['gallery'])
if opt.multi:
mquery_feature = extract_feature(model,dataloaders['multi-query'])
time_elapsed = time.time() - since
Expand Down

0 comments on commit 36cac9a

Please sign in to comment.