Skip to content

Commit 430ff02

Browse files
authored
Fix PALETTE AttributeError in single_gpu_test (#7230)
1 parent 37a1150 commit 430ff02

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mmdet/apis/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def single_gpu_test(model,
2222
model.eval()
2323
results = []
2424
dataset = data_loader.dataset
25-
PALETTE = dataset.PALETTE
25+
PALETTE = getattr(dataset, 'PALETTE', None)
2626
prog_bar = mmcv.ProgressBar(len(dataset))
2727
for i, data in enumerate(data_loader):
2828
with torch.no_grad():

0 commit comments

Comments
 (0)