democat commited on
Commit
f8722b4
·
unverified ·
1 Parent(s): 574ceed

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

Browse files
Files changed (1) hide show
  1. models/common.py +2 -0
models/common.py CHANGED
@@ -441,6 +441,8 @@ class DetectMultiBackend(nn.Module):
441
  output_details = interpreter.get_output_details() # outputs
442
  elif tfjs:
443
  raise Exception('ERROR: YOLOv5 TF.js inference is not supported')
 
 
444
  self.__dict__.update(locals()) # assign all variables to self
445
 
446
  def forward(self, im, augment=False, visualize=False, val=False):
 
441
  output_details = interpreter.get_output_details() # outputs
442
  elif tfjs:
443
  raise Exception('ERROR: YOLOv5 TF.js inference is not supported')
444
+ else:
445
+ raise Exception(f'ERROR: {w} is not a supported format')
446
  self.__dict__.update(locals()) # assign all variables to self
447
 
448
  def forward(self, im, augment=False, visualize=False, val=False):