测试pytorch时间

torch.cuda.synchronize()
start = time.time()
result = model(return_loss=False, rescale=True, **data)
torch.cuda.synchronize()
end = time.time()
print(end - start, "s")
posted @ 2023-02-17 18:05  无左无右  阅读(24)  评论(0编辑  收藏  举报