Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove todo as issue is currently not reproducible. #1117

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading