Hi, I want to know, when I would like to measure the time of a image through the GPU model, which one is correct?
1, start = time.time()
result = vgg_gpu_model(image)
end = time.time()
2, torch.cuda.synchronize()
start = time.time()
result = vgg_gpu_model(image)
torch.cuda.synchronize()
end = time.time()
I find that, the time result of method 1 and method 2 is very different, but the output result is same.What’s the difference between them?
Thanks for your attention.