Fix palette type. (#27)

pull/32/head
ycr 2020-07-23 13:01:31 +08:00 committed by GitHub
parent 1bedfe305b
commit 579f5f883e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

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