Unverified 提交 f8722b44 authored 作者: Colin Wong's avatar Colin Wong 提交者: GitHub

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

Raise error on invalid model
上级 574ceedf
...@@ -441,6 +441,8 @@ class DetectMultiBackend(nn.Module): ...@@ -441,6 +441,8 @@ class DetectMultiBackend(nn.Module):
output_details = interpreter.get_output_details() # outputs output_details = interpreter.get_output_details() # outputs
elif tfjs: elif tfjs:
raise Exception('ERROR: YOLOv5 TF.js inference is not supported') 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 self.__dict__.update(locals()) # assign all variables to self
def forward(self, im, augment=False, visualize=False, val=False): def forward(self, im, augment=False, visualize=False, val=False):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论