Skip to content

Commit

Permalink
Cleaner test eval
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Sep 24, 2024
1 parent bb32466 commit 346c155
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/brevitas/graph/test_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ def forward(self, x):

computed_scale = model.act.act_quant.scale(), model.act_1.act_quant.scale()
reference_values = REFERENCE_SCALES[reference]
assert all([
torch.allclose(comp, torch.tensor(ref)) for comp,
ref in zip(computed_scale, reference_values)])
assert torch.allclose(computed_scale[0], torch.tensor(reference_values[0]))
assert torch.allclose(computed_scale[1], torch.tensor(reference_values[1]))


def test_calibration_training_state():
Expand Down

0 comments on commit 346c155

Please sign in to comment.