Improve tests coverage and speed (#4340)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2023-08-13 22:24:01 +02:00
committed by GitHub
parent d704507217
commit 9f6d48d3cf
10 changed files with 183 additions and 347 deletions

View File

@ -16,7 +16,7 @@ class RTDETR(Model):
"""
def __init__(self, model='rtdetr-l.pt') -> None:
if model and not model.split('.')[-1] in ('pt', 'yaml', 'yml'):
if model and model.split('.')[-1] not in ('pt', 'yaml', 'yml'):
raise NotImplementedError('RT-DETR only supports creating from *.pt file or *.yaml file.')
super().__init__(model=model, task='detect')