File tree 1 file changed +14
-13
lines changed
1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -90,19 +90,6 @@ def single_gpu_test(model,
90
90
with torch .no_grad ():
91
91
result = model (return_loss = False , ** data )
92
92
93
- if efficient_test :
94
- result = [np2tmp (_ , tmpdir = '.efficient_test' ) for _ in result ]
95
-
96
- if format_only :
97
- result = dataset .format_results (
98
- result , indices = batch_indices , ** format_args )
99
- if pre_eval :
100
- # TODO: adapt samples_per_gpu > 1.
101
- # only samples_per_gpu=1 valid now
102
- result = dataset .pre_eval (result , indices = batch_indices )
103
-
104
- results .extend (result )
105
-
106
93
if show or out_dir :
107
94
img_tensor = data ['img' ][0 ]
108
95
img_metas = data ['img_metas' ][0 ].data [0 ]
@@ -129,6 +116,20 @@ def single_gpu_test(model,
129
116
out_file = out_file ,
130
117
opacity = opacity )
131
118
119
+ if efficient_test :
120
+ result = [np2tmp (_ , tmpdir = '.efficient_test' ) for _ in result ]
121
+
122
+ if format_only :
123
+ result = dataset .format_results (
124
+ result , indices = batch_indices , ** format_args )
125
+ if pre_eval :
126
+ # TODO: adapt samples_per_gpu > 1.
127
+ # only samples_per_gpu=1 valid now
128
+ result = dataset .pre_eval (result , indices = batch_indices )
129
+ results .extend (result )
130
+ else :
131
+ results .extend (result )
132
+
132
133
batch_size = len (result )
133
134
for _ in range (batch_size ):
134
135
prog_bar .update ()
You can’t perform that action at this time.
0 commit comments