Skip to content

Commit 204aeed

Browse files
authored
[Enhancement] move copy_to_cpu before counting time in infer.py (#2595)
1 parent cb71259 commit 204aeed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Matting/deploy/python/infer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,11 +397,11 @@ def run(self, imgs, trimaps=None, imgs_dir=None):
397397

398398
self.predictor.run()
399399

400+
results = output_handle.copy_to_cpu()
401+
400402
if args.benchmark:
401403
self.autolog.times.stamp()
402404

403-
results = output_handle.copy_to_cpu()
404-
405405
results = results.squeeze(1)
406406
for j in range(args.batch_size):
407407
trimap = trimap_inputs[j] if trimaps is not None else None

0 commit comments

Comments
 (0)