Skip to content

Commit 5b0b77f

Browse files
author
Degroot
committedMar 11, 2019
Update .dim() to .size(0) in eval.py for compatibility with latest .dim() functionality
1 parent ad98ca4 commit 5b0b77f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎eval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def test_net(save_folder, net, cuda, dataset, transform, top_k,
390390
dets = detections[0, j, :]
391391
mask = dets[:, 0].gt(0.).expand(5, dets.size(0)).t()
392392
dets = torch.masked_select(dets, mask).view(-1, 5)
393-
if dets.dim() == 0:
393+
if dets.size(0) == 0:
394394
continue
395395
boxes = dets[:, 1:]
396396
boxes[:, 0] *= w

0 commit comments

Comments
 (0)