Skip to content

Commit

Permalink
Fix (examples/a2q): adding input assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
i-colbert committed Feb 6, 2024
1 parent 28c74f7 commit d5878ff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/brevitas_examples/imagenet_classification/a2q/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def get_model_by_name(
init_from_float_checkpoint: bool = False) -> nn.Module:

assert model_name in model_impl, f"Error: {model_name} not implemented."
assert not (pretrained and init_from_float_checkpoint), "Error: pretrained and init_from_float_checkpoint cannot both be true."
model: Module = model_impl[model_name]()

if init_from_float_checkpoint:
Expand Down

0 comments on commit d5878ff

Please sign in to comment.