Raise error on suffix-less model path (#8561)

Raise error on invalid model
This commit is contained in:
Colin Wong 2022-07-13 04:13:01 -05:00 committed by GitHub
parent 574ceedfc5
commit f8722b4429
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -441,6 +441,8 @@ class DetectMultiBackend(nn.Module):
output_details = interpreter.get_output_details() # outputs
elif tfjs:
raise Exception('ERROR: YOLOv5 TF.js inference is not supported')
else:
raise Exception(f'ERROR: {w} is not a supported format')
self.__dict__.update(locals()) # assign all variables to self
def forward(self, im, augment=False, visualize=False, val=False):