Unverified Commit dc42f933 authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

only sync cuda ifn cuda available (#3674)


Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
parent 9778d267
......@@ -84,6 +84,7 @@ def evaluate(model, data_loader, device):
for images, targets in metric_logger.log_every(data_loader, 100, header):
images = list(img.to(device) for img in images)
if torch.cuda.is_available():
torch.cuda.synchronize()
model_time = time.time()
outputs = model(images)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment