Skip to content

Commit

Permalink
Raise error on invalid model
Browse files Browse the repository at this point in the history
  • Loading branch information
democat3457 committed Jul 12, 2022
1 parent 574ceed commit a3375ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ def wrap_frozen_graph(gd, inputs, outputs):
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):
Expand Down

0 comments on commit a3375ac

Please sign in to comment.