Fix palette type. (#27)

This commit is contained in:
ycr 2020-07-23 13:01:31 +08:00 committed by GitHub
parent 6e96bf83e5
commit a932cbe02e

View File

@ -242,8 +242,7 @@ class BaseSegmentor(nn.Module):
0, 255, size=(len(self.CLASSES), 3))
else:
palette = self.PALETTE
else:
palette = np.array(palette)
palette = np.array(palette)
assert palette.shape[0] == len(self.CLASSES)
assert palette.shape[1] == 3
assert len(palette.shape) == 2