Support both *.yml
and *.yaml
files (#4086)
Co-authored-by: ChristopherRogers1991 <ChristopherRogers1991@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sungjoo(Dennis) Hwang <48212469+Denny-Hwang@users.noreply.github.com>
This commit is contained in:
@ -23,7 +23,7 @@ from .val import NASValidator
|
||||
class NAS(Model):
|
||||
|
||||
def __init__(self, model='yolo_nas_s.pt') -> None:
|
||||
assert Path(model).suffix != '.yaml', 'YOLO-NAS models only support pre-trained models.'
|
||||
assert Path(model).suffix not in ('.yaml', '.yml'), 'YOLO-NAS models only support pre-trained models.'
|
||||
super().__init__(model, task='detect')
|
||||
|
||||
@smart_inference_mode()
|
||||
|
Reference in New Issue
Block a user