Skip to content

Commit db44d16

Browse files
authored
infer batch size using len(result) in test function (#532)
1 parent 4403923 commit db44d16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mmseg/apis/test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def multi_gpu_test(model,
149149
results.append(result)
150150

151151
if rank == 0:
152-
batch_size = data['img'][0].size(0)
152+
batch_size = len(result)
153153
for _ in range(batch_size * world_size):
154154
prog_bar.update()
155155

0 commit comments

Comments
 (0)