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:
parent
d704507217
commit
9f6d48d3cf
10 changed files with 183 additions and 347 deletions
|
|
@ -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')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue