Skip to content

Commit

Permalink
remove todo. issue is currently not reproducible.
Browse files Browse the repository at this point in the history
  • Loading branch information
eladc-git committed Jun 26, 2024
1 parent 04bc6eb commit 95c5098
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,7 @@ def compare(self, quantized_models, float_model, input_x=None, quantization_info

is_bn_in_model = nn.BatchNorm2d in [type(module) for name, module in quant_model.named_modules()]
self.unit_test.assertTrue(self.fold_applied is not is_bn_in_model)

# TODO: remove this and set atol=1e-5 for all tests after fixing the issue with ConvTranspose2d.
# https://github.com/sony/model_optimization/issues/1115
is_convtranspose2d_in_model = nn.ConvTranspose2d in [type(module) for name, module in quant_model.named_modules()]
atol = 1e-3 if is_convtranspose2d_in_model else 1e-5
self.unit_test.assertTrue(np.isclose(out_quant, out_float, atol=atol, rtol=1e-4).all())
self.unit_test.assertTrue(np.isclose(out_quant, out_float, atol=1e-5, rtol=1e-4).all())


class BNForwardFoldingNet(nn.Module):
Expand Down

0 comments on commit 95c5098

Please sign in to comment.