fix assert (#3119)

This commit is contained in:
谢昕辰 2023-06-19 18:34:52 +08:00 committed by GitHub
parent b0635ff783
commit b8b6ee6017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -328,7 +328,7 @@ class EncoderDecoder(BaseSegmentor):
"""
assert self.test_cfg.get('mode', 'whole') in ['slide', 'whole'], \
f'Only "slide" or "whole" test mode are supported, but got ' \
f'{self.test_cfg.mode}'
f'{self.test_cfg["mode"]}.'
ori_shape = batch_img_metas[0]['ori_shape']
assert all(_['ori_shape'] == ori_shape for _ in batch_img_metas)
if self.test_cfg.mode == 'slide':